first commit

This commit is contained in:
zzc
1970-01-01 08:26:29 +08:00
commit ed6cca82db
91 changed files with 8400 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
[InternetShortcut]
URL=https://docs.cocos.com/creator/manual/en/scripting/setup.html#custom-script-template

View File

@@ -0,0 +1,5 @@
{
"image": {
"type": "sprite-frame"
}
}

24
.gitignore vendored Normal file
View File

@@ -0,0 +1,24 @@
#///////////////////////////
# Cocos Creator 3D Project
#///////////////////////////
library/
temp/
local/
build/
profiles/
native
#//////////////////////////
# NPM
#//////////////////////////
node_modules/
#//////////////////////////
# VSCode
#//////////////////////////
.vscode/
#//////////////////////////
# WebStorm
#//////////////////////////
.idea/

BIN
assets/.DS_Store vendored Normal file

Binary file not shown.

14
assets/resources.meta Normal file
View File

@@ -0,0 +1,14 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "53535979-36cb-4303-96ba-81937cf2ebbf",
"files": [],
"subMetas": {},
"userData": {
"isBundle": true,
"bundleConfigID": "default",
"bundleName": "resources",
"priority": 8
}
}

BIN
assets/resources/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "57f6ecdb-cfd9-4fc3-bfe3-c0fb77edbc0a",
"files": [],
"subMetas": {},
"userData": {}
}

BIN
assets/resources/music/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "72f846c7-63aa-454b-954e-631ba2b30448",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

Binary file not shown.

View File

@@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "a9c1c405-32fc-4f27-a94c-ed0fa0dbfcf7",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

Binary file not shown.

View File

@@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "a2214b87-c174-4093-958a-8127599085c6",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

Binary file not shown.

View File

@@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "1249a178-91a7-4dd4-bb0c-054818b6a9de",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

Binary file not shown.

View File

@@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "c9116624-dcc5-4d0c-a166-d9c9824e8d72",
"files": [
".json",
".wav"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

Binary file not shown.

View File

@@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "b7f58657-429c-4d6f-8d8f-b687007ac1d9",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

Binary file not shown.

View File

@@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "d517e482-ffae-4805-a86c-dae75ce7dfcc",
"files": [
".json",
".wav"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

Binary file not shown.

View File

@@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "82a22eab-1575-4e38-94c4-e41ab794864e",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "a1552e1d-5a98-43cb-b8b3-01b900a7d4c3",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,213 @@
[
{
"__type__": "cc.Prefab",
"_name": "Explosion",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Explosion",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
},
{
"__id__": 4
}
],
"_prefab": {
"__id__": 6
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 3
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0f1FYZD0RB5prw898oLAqS"
},
{
"__type__": "cc.ParticleSystem2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 5
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"duration": 0.2,
"emissionRate": 200,
"life": 0.6,
"lifeVar": 0.3,
"angle": 0,
"angleVar": 360,
"startSize": 20,
"startSizeVar": 10,
"endSize": 5,
"endSizeVar": 0,
"startSpin": 0,
"startSpinVar": 0,
"endSpin": 0,
"endSpinVar": 0,
"sourcePos": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"posVar": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"emitterMode": 0,
"gravity": {
"__type__": "cc.Vec2",
"x": 0,
"y": -600
},
"speed": 300,
"speedVar": 100,
"tangentialAccel": 0,
"tangentialAccelVar": 0,
"radialAccel": 0,
"radialAccelVar": 0,
"rotationIsDir": false,
"startRadius": 0,
"startRadiusVar": 0,
"endRadius": 0,
"endRadiusVar": 0,
"rotatePerS": 0,
"rotatePerSVar": 0,
"playOnLoad": true,
"autoRemoveOnFinish": false,
"_preview": true,
"preview": true,
"_custom": true,
"_file": null,
"_spriteFrame": {
"__uuid__": "281146ac-4d17-48a3-9e93-87df0f3a41d9@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_totalParticles": 150,
"_startColor": {
"__type__": "cc.Color",
"r": 255,
"g": 200,
"b": 10,
"a": 255
},
"_startColorVar": {
"__type__": "cc.Color",
"r": 30,
"g": 30,
"b": 30,
"a": 0
},
"_endColor": {
"__type__": "cc.Color",
"r": 255,
"g": 50,
"b": 50,
"a": 0
},
"_endColorVar": {
"__type__": "cc.Color",
"r": 30,
"g": 30,
"b": 30,
"a": 0
},
"_positionType": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f9lWDfs39MVLhl3mu85Pp1"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "c46/YsCPVOJYA4mWEpNYRx",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "6fadf718-47bf-401a-ad18-900a6eba4af6",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "Explosion"
}
}

View File

@@ -0,0 +1,236 @@
[
{
"__type__": "cc.Prefab",
"_name": "Fruit",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fruit",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
},
{
"__id__": 4
},
{
"__id__": 6
},
{
"__id__": 8
},
{
"__id__": 10
}
],
"_prefab": {
"__id__": 12
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 3
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f2xURHZspCW6eOPX1Lqlic"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 5
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": null,
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a0IlngGyFJI472PyJnWRnk"
},
{
"__type__": "cc.CircleCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 7
},
"tag": 0,
"_group": 1,
"_density": 1,
"_sensor": false,
"_friction": 0.2,
"_restitution": 0.2,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_radius": 50,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "1bnE5FcwlC7LRDhKHuP15A"
},
{
"__type__": "cc.RigidBody2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 9
},
"enabledContactListener": true,
"bullet": false,
"awakeOnLoad": true,
"_group": 1,
"_type": 2,
"_allowSleep": true,
"_gravityScale": 1,
"_linearDamping": 0,
"_angularDamping": 0.2,
"_linearVelocity": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_angularVelocity": 0,
"_fixedRotation": false,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "33dsmtVs1AhZePxKQrfoUc"
},
{
"__type__": "bb609SzM4pEHKgnMu3BRdxj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 11
},
"level": 1,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "64+ujD+opEEaVAwU0nvHvG"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "c46/YsCPVOJYA4mWEpNYRx",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "58d1b10e-557b-4f03-a5d7-e0fa15ca8e28",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "Fruit"
}
}

9
assets/resources/ui.meta Normal file
View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "2f86ad9d-8e50-4cd2-bb97-3a48b6d5462f",
"files": [],
"subMetas": {},
"userData": {}
}

BIN
assets/resources/ui/.DS_Store vendored Normal file

Binary file not shown.

BIN
assets/resources/ui/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "e7b6b06d-45f2-44ba-90cd-d95772fb4225",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "e7b6b06d-45f2-44ba-90cd-d95772fb4225@6c48a",
"displayName": "bg",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "e7b6b06d-45f2-44ba-90cd-d95772fb4225",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "e7b6b06d-45f2-44ba-90cd-d95772fb4225@f9941",
"displayName": "bg",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 720,
"height": 1280,
"rawWidth": 720,
"rawHeight": 1280,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-360,
-640,
0,
360,
-640,
0,
-360,
640,
0,
360,
640,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
1280,
720,
1280,
0,
0,
720,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-360,
-640,
0
],
"maxPos": [
360,
640,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "e7b6b06d-45f2-44ba-90cd-d95772fb4225@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": false,
"fixAlphaTransparencyArtifacts": false,
"redirect": "e7b6b06d-45f2-44ba-90cd-d95772fb4225@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "0b2fd303-5502-4b3f-9ffc-219b0f7d7bf6",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "0b2fd303-5502-4b3f-9ffc-219b0f7d7bf6@6c48a",
"displayName": "crown",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "0b2fd303-5502-4b3f-9ffc-219b0f7d7bf6",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "0b2fd303-5502-4b3f-9ffc-219b0f7d7bf6@f9941",
"displayName": "crown",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 5,
"trimX": 0,
"trimY": 0,
"width": 278,
"height": 246,
"rawWidth": 278,
"rawHeight": 256,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-139,
-123,
0,
139,
-123,
0,
-139,
123,
0,
139,
123,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
256,
278,
256,
0,
10,
278,
10
],
"nuv": [
0,
0.0390625,
1,
0.0390625,
0,
1,
1,
1
],
"minPos": [
-139,
-123,
0
],
"maxPos": [
139,
123,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "0b2fd303-5502-4b3f-9ffc-219b0f7d7bf6@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "0b2fd303-5502-4b3f-9ffc-219b0f7d7bf6@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "e1207835-23ff-415e-9732-d644fd0140f9",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "e1207835-23ff-415e-9732-d644fd0140f9@6c48a",
"displayName": "dead_line",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "e1207835-23ff-415e-9732-d644fd0140f9",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "e1207835-23ff-415e-9732-d644fd0140f9@f9941",
"displayName": "dead_line",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 711,
"height": 8,
"rawWidth": 711,
"rawHeight": 8,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-355.5,
-4,
0,
355.5,
-4,
0,
-355.5,
4,
0,
355.5,
4,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
8,
711,
8,
0,
0,
711,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-355.5,
-4,
0
],
"maxPos": [
355.5,
4,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "e1207835-23ff-415e-9732-d644fd0140f9@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "e1207835-23ff-415e-9732-d644fd0140f9@6c48a"
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "7971a121-83bb-44d3-aa9f-109d2f8cc67a",
"files": [],
"subMetas": {},
"userData": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "84816a04-8b17-4892-9e1b-7735ea15f506",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "84816a04-8b17-4892-9e1b-7735ea15f506@6c48a",
"displayName": "1",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "84816a04-8b17-4892-9e1b-7735ea15f506",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "84816a04-8b17-4892-9e1b-7735ea15f506@f9941",
"displayName": "1",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 52,
"height": 52,
"rawWidth": 52,
"rawHeight": 52,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-26,
-26,
0,
26,
-26,
0,
-26,
26,
0,
26,
26,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
52,
52,
52,
0,
0,
52,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-26,
-26,
0
],
"maxPos": [
26,
26,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "84816a04-8b17-4892-9e1b-7735ea15f506@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "84816a04-8b17-4892-9e1b-7735ea15f506@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "7f274084-6f3e-4d8a-a75c-9a42f100ac93",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "7f274084-6f3e-4d8a-a75c-9a42f100ac93@6c48a",
"displayName": "10",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "7f274084-6f3e-4d8a-a75c-9a42f100ac93",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "7f274084-6f3e-4d8a-a75c-9a42f100ac93@f9941",
"displayName": "10",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"trimX": 3,
"trimY": 4,
"width": 302,
"height": 302,
"rawWidth": 308,
"rawHeight": 309,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-151,
-151,
0,
151,
-151,
0,
-151,
151,
0,
151,
151,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
3,
305,
305,
305,
3,
3,
305,
3
],
"nuv": [
0.00974025974025974,
0.009708737864077669,
0.9902597402597403,
0.009708737864077669,
0.00974025974025974,
0.9870550161812298,
0.9902597402597403,
0.9870550161812298
],
"minPos": [
-151,
-151,
0
],
"maxPos": [
151,
151,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "7f274084-6f3e-4d8a-a75c-9a42f100ac93@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "7f274084-6f3e-4d8a-a75c-9a42f100ac93@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "f38ab1e3-817e-4557-8c56-2965ab33232f",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "f38ab1e3-817e-4557-8c56-2965ab33232f@6c48a",
"displayName": "11",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "f38ab1e3-817e-4557-8c56-2965ab33232f",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "f38ab1e3-817e-4557-8c56-2965ab33232f@f9941",
"displayName": "11",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 2,
"trimY": 2,
"width": 404,
"height": 404,
"rawWidth": 408,
"rawHeight": 408,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-202,
-202,
0,
202,
-202,
0,
-202,
202,
0,
202,
202,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
2,
406,
406,
406,
2,
2,
406,
2
],
"nuv": [
0.004901960784313725,
0.004901960784313725,
0.9950980392156863,
0.004901960784313725,
0.004901960784313725,
0.9950980392156863,
0.9950980392156863,
0.9950980392156863
],
"minPos": [
-202,
-202,
0
],
"maxPos": [
202,
202,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "f38ab1e3-817e-4557-8c56-2965ab33232f@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "f38ab1e3-817e-4557-8c56-2965ab33232f@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "6bd1967a-cbe1-431e-9b86-66fe44383df8",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "6bd1967a-cbe1-431e-9b86-66fe44383df8@6c48a",
"displayName": "2",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "6bd1967a-cbe1-431e-9b86-66fe44383df8",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "6bd1967a-cbe1-431e-9b86-66fe44383df8@f9941",
"displayName": "2",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1,
"trimY": 1,
"width": 78,
"height": 78,
"rawWidth": 80,
"rawHeight": 80,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-39,
-39,
0,
39,
-39,
0,
-39,
39,
0,
39,
39,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
1,
79,
79,
79,
1,
1,
79,
1
],
"nuv": [
0.0125,
0.0125,
0.9875,
0.0125,
0.0125,
0.9875,
0.9875,
0.9875
],
"minPos": [
-39,
-39,
0
],
"maxPos": [
39,
39,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "6bd1967a-cbe1-431e-9b86-66fe44383df8@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "6bd1967a-cbe1-431e-9b86-66fe44383df8@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "371e1d75-2fe1-42f6-9537-77a13967b484",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "371e1d75-2fe1-42f6-9537-77a13967b484@6c48a",
"displayName": "3",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "371e1d75-2fe1-42f6-9537-77a13967b484",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "371e1d75-2fe1-42f6-9537-77a13967b484@f9941",
"displayName": "3",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 108,
"height": 108,
"rawWidth": 108,
"rawHeight": 108,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-54,
-54,
0,
54,
-54,
0,
-54,
54,
0,
54,
54,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
108,
108,
108,
0,
0,
108,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-54,
-54,
0
],
"maxPos": [
54,
54,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "371e1d75-2fe1-42f6-9537-77a13967b484@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "371e1d75-2fe1-42f6-9537-77a13967b484@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "4c5e158d-2fc5-43a3-82ec-d5b9fc598b94",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "4c5e158d-2fc5-43a3-82ec-d5b9fc598b94@6c48a",
"displayName": "4",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "4c5e158d-2fc5-43a3-82ec-d5b9fc598b94",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "4c5e158d-2fc5-43a3-82ec-d5b9fc598b94@f9941",
"displayName": "4",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 119,
"height": 119,
"rawWidth": 119,
"rawHeight": 119,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-59.5,
-59.5,
0,
59.5,
-59.5,
0,
-59.5,
59.5,
0,
59.5,
59.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
119,
119,
119,
0,
0,
119,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-59.5,
-59.5,
0
],
"maxPos": [
59.5,
59.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "4c5e158d-2fc5-43a3-82ec-d5b9fc598b94@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "4c5e158d-2fc5-43a3-82ec-d5b9fc598b94@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "ed717906-95a0-40e4-bc39-3f079723676c",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "ed717906-95a0-40e4-bc39-3f079723676c@6c48a",
"displayName": "5",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "ed717906-95a0-40e4-bc39-3f079723676c",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "ed717906-95a0-40e4-bc39-3f079723676c@f9941",
"displayName": "5",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 153,
"height": 152,
"rawWidth": 153,
"rawHeight": 152,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-76.5,
-76,
0,
76.5,
-76,
0,
-76.5,
76,
0,
76.5,
76,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
152,
153,
152,
0,
0,
153,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-76.5,
-76,
0
],
"maxPos": [
76.5,
76,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "ed717906-95a0-40e4-bc39-3f079723676c@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "ed717906-95a0-40e4-bc39-3f079723676c@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "b07dc052-d1ad-4a15-9c5e-269412084ecd",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "b07dc052-d1ad-4a15-9c5e-269412084ecd@6c48a",
"displayName": "6",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "b07dc052-d1ad-4a15-9c5e-269412084ecd",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "b07dc052-d1ad-4a15-9c5e-269412084ecd@f9941",
"displayName": "6",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 183,
"height": 183,
"rawWidth": 183,
"rawHeight": 183,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-91.5,
-91.5,
0,
91.5,
-91.5,
0,
-91.5,
91.5,
0,
91.5,
91.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
183,
183,
183,
0,
0,
183,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-91.5,
-91.5,
0
],
"maxPos": [
91.5,
91.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "b07dc052-d1ad-4a15-9c5e-269412084ecd@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "b07dc052-d1ad-4a15-9c5e-269412084ecd@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "672e25b4-c189-4145-bfe4-9a4a07bcfa87",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "672e25b4-c189-4145-bfe4-9a4a07bcfa87@6c48a",
"displayName": "7",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "672e25b4-c189-4145-bfe4-9a4a07bcfa87",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "672e25b4-c189-4145-bfe4-9a4a07bcfa87@f9941",
"displayName": "7",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 0.5,
"trimX": 3,
"trimY": 3,
"width": 186,
"height": 186,
"rawWidth": 193,
"rawHeight": 193,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-93,
-93,
0,
93,
-93,
0,
-93,
93,
0,
93,
93,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
3,
190,
189,
190,
3,
4,
189,
4
],
"nuv": [
0.015544041450777202,
0.02072538860103627,
0.9792746113989638,
0.02072538860103627,
0.015544041450777202,
0.9844559585492227,
0.9792746113989638,
0.9844559585492227
],
"minPos": [
-93,
-93,
0
],
"maxPos": [
93,
93,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "672e25b4-c189-4145-bfe4-9a4a07bcfa87@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "672e25b4-c189-4145-bfe4-9a4a07bcfa87@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "732aeab5-4112-4e1b-9d6a-10cc7af6e74c",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "732aeab5-4112-4e1b-9d6a-10cc7af6e74c@6c48a",
"displayName": "8",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "732aeab5-4112-4e1b-9d6a-10cc7af6e74c",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "732aeab5-4112-4e1b-9d6a-10cc7af6e74c@f9941",
"displayName": "8",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 258,
"height": 258,
"rawWidth": 258,
"rawHeight": 258,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-129,
-129,
0,
129,
-129,
0,
-129,
129,
0,
129,
129,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
258,
258,
258,
0,
0,
258,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-129,
-129,
0
],
"maxPos": [
129,
129,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "732aeab5-4112-4e1b-9d6a-10cc7af6e74c@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "732aeab5-4112-4e1b-9d6a-10cc7af6e74c@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "281146ac-4d17-48a3-9e93-87df0f3a41d9",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "281146ac-4d17-48a3-9e93-87df0f3a41d9@6c48a",
"displayName": "9",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "281146ac-4d17-48a3-9e93-87df0f3a41d9",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "281146ac-4d17-48a3-9e93-87df0f3a41d9@f9941",
"displayName": "9",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 308,
"height": 308,
"rawWidth": 308,
"rawHeight": 308,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-154,
-154,
0,
154,
-154,
0,
-154,
154,
0,
154,
154,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
308,
308,
308,
0,
0,
308,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-154,
-154,
0
],
"maxPos": [
154,
154,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "281146ac-4d17-48a3-9e93-87df0f3a41d9@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "281146ac-4d17-48a3-9e93-87df0f3a41d9@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "7fd8e0a9-8426-4cb4-99ef-79789ec1b237",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "7fd8e0a9-8426-4cb4-99ef-79789ec1b237@6c48a",
"displayName": "home",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "7fd8e0a9-8426-4cb4-99ef-79789ec1b237",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "7fd8e0a9-8426-4cb4-99ef-79789ec1b237@f9941",
"displayName": "home",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 54,
"height": 48,
"rawWidth": 54,
"rawHeight": 48,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-27,
-24,
0,
27,
-24,
0,
-27,
24,
0,
27,
24,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
48,
54,
48,
0,
0,
54,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-27,
-24,
0
],
"maxPos": [
27,
24,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "7fd8e0a9-8426-4cb4-99ef-79789ec1b237@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "7fd8e0a9-8426-4cb4-99ef-79789ec1b237@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "ddb84e46-6b8a-4060-9391-98ad064fdf82",
"files": [
".jpg",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "ddb84e46-6b8a-4060-9391-98ad064fdf82@6c48a",
"displayName": "land",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "ddb84e46-6b8a-4060-9391-98ad064fdf82",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "ddb84e46-6b8a-4060-9391-98ad064fdf82@f9941",
"displayName": "land",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 268,
"height": 72,
"rawWidth": 268,
"rawHeight": 72,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-134,
-36,
0,
134,
-36,
0,
-134,
36,
0,
134,
36,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
72,
268,
72,
0,
0,
268,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-134,
-36,
0
],
"maxPos": [
134,
36,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "ddb84e46-6b8a-4060-9391-98ad064fdf82@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": false,
"fixAlphaTransparencyArtifacts": false,
"redirect": "ddb84e46-6b8a-4060-9391-98ad064fdf82@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "cc0607d5-bdf2-456b-9198-51a285a2cfc1",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "cc0607d5-bdf2-456b-9198-51a285a2cfc1@6c48a",
"displayName": "round-filled",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "cc0607d5-bdf2-456b-9198-51a285a2cfc1",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "cc0607d5-bdf2-456b-9198-51a285a2cfc1@f9941",
"displayName": "round-filled",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 8,
"trimY": 8,
"width": 32,
"height": 32,
"rawWidth": 48,
"rawHeight": 48,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-16,
-16,
0,
16,
-16,
0,
-16,
16,
0,
16,
16,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
8,
40,
40,
40,
8,
8,
40,
8
],
"nuv": [
0.16666666666666666,
0.16666666666666666,
0.8333333333333334,
0.16666666666666666,
0.16666666666666666,
0.8333333333333334,
0.8333333333333334,
0.8333333333333334
],
"minPos": [
-16,
-16,
0
],
"maxPos": [
16,
16,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "cc0607d5-bdf2-456b-9198-51a285a2cfc1@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "cc0607d5-bdf2-456b-9198-51a285a2cfc1@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 900 B

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "235caa9d-c75e-400b-b676-21533ee234f3",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "235caa9d-c75e-400b-b676-21533ee234f3@6c48a",
"displayName": "setting",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "235caa9d-c75e-400b-b676-21533ee234f3",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "235caa9d-c75e-400b-b676-21533ee234f3@f9941",
"displayName": "setting",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 2,
"width": 48,
"height": 44,
"rawWidth": 48,
"rawHeight": 48,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-24,
-22,
0,
24,
-22,
0,
-24,
22,
0,
24,
22,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
46,
48,
46,
0,
2,
48,
2
],
"nuv": [
0,
0.041666666666666664,
1,
0.041666666666666664,
0,
0.9583333333333334,
1,
0.9583333333333334
],
"minPos": [
-24,
-22,
0
],
"maxPos": [
24,
22,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "235caa9d-c75e-400b-b676-21533ee234f3@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "235caa9d-c75e-400b-b676-21533ee234f3@6c48a"
}
}

9
assets/scene.meta Normal file
View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "eafd10e5-7931-4564-8653-bb82404f4321",
"files": [],
"subMetas": {},
"userData": {}
}

4123
assets/scene/game.scene Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
{
"ver": "1.1.50",
"importer": "scene",
"imported": true,
"uuid": "ddb84ebf-cdb6-4d7d-951a-cd864f59fc31",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

9
assets/script.meta Normal file
View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "0aa33634-bdae-4549-9b34-a25f7da2708a",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,140 @@
import { _decorator, Component, Node, AudioSource, AudioClip, director } from 'cc';
const { ccclass, property } = _decorator;
// 背景音乐类型
export enum BGMType {
Home,
Level,
Boss,
Play
}
// 音效类型
export enum SFXType {
Merge,
Success,
Fail,
Item,
Victory,
Magic,
Shuffle,
Hint
}
@ccclass('AudioManager')
export class AudioManager extends Component {
private static _instance: AudioManager | null = null;
public static get instance(): AudioManager {
console.log(33333, !this._instance)
if (!this._instance) {
const node = new Node('AudioManager');
this._instance = node.addComponent(AudioManager);
director.addPersistRootNode(node);
}
return this._instance;
}
// AudioSources
private bgmSource!: AudioSource;
private sfxSource!: AudioSource;
// 开关
public bgmEnabled: boolean = true;
public sfxEnabled: boolean = true;
// 音乐 / 音效 Map
private bgmClips: Map<BGMType, AudioClip> = new Map();
private sfxClips: Map<SFXType, AudioClip> = new Map();
private currentBGM: BGMType | null = null;
onLoad() {
// 初始化单例
AudioManager._instance = this;
// 跨场景不销毁
// director.addPersistRootNode(this.node);
// 读取本地开关
this.bgmEnabled = localStorage.getItem('bgmEnabled') !== '0';
this.sfxEnabled = localStorage.getItem('sfxEnabled') !== '0';
// 自动挂载或创建 AudioSource
const sources = this.node.getComponents(AudioSource);
if (sources.length >= 2) {
this.bgmSource = sources[0];
this.sfxSource = sources[1];
} else {
this.bgmSource = this.node.addComponent(AudioSource);
this.bgmSource.loop = true;
this.sfxSource = this.node.addComponent(AudioSource);
}
}
/** 注册 BGM */
public registerBGM(type: BGMType, clip: AudioClip) {
this.bgmClips.set(type, clip);
}
/** 注册 SFX */
public registerSFX(type: SFXType, clip: AudioClip) {
this.sfxClips.set(type, clip);
}
/** 播放背景音乐 */
public playBGM(type: BGMType) {
// if (!this.bgmEnabled) return;
// if (this.currentBGM === type) return;
const clip = this.bgmClips.get(type);
if (!clip) return;
this.currentBGM = type;
this.bgmSource.clip = clip;
this.bgmSource.loop = true;
this.bgmSource.volume = 0.5;
this.bgmSource.play();
}
/** 播放音效 */
public playSFX(type: SFXType) {
// if (!this.sfxEnabled) return;
const clip = this.sfxClips.get(type);
if (!clip) return;
this.sfxSource.playOneShot(clip, 1.0);
}
/** 设置 BGM 开关 */
public setBGMEnabled(enabled: boolean) {
this.bgmEnabled = enabled;
localStorage.setItem('bgmEnabled', enabled ? '1' : '0');
if (!this.bgmSource) return;
if (enabled) {
// 开启播放当前 BGM
if (this.currentBGM !== null || this.currentBGM !== undefined) {
const clip = this.bgmClips.get(this.currentBGM);
if (clip) {
this.bgmSource.clip = clip;
this.bgmSource.play();
}
}
} else {
// 关闭停止播放
this.bgmSource.stop();
}
}
/** 设置 SFX 开关 */
public setSFXEnabled(enabled: boolean) {
this.sfxEnabled = enabled;
localStorage.setItem('sfxEnabled', enabled ? '1' : '0');
// 关闭音效后playSFX 会直接返回,不会播放
}
/** 设置 SFX 开关 */
public setCurBgm(type: number) {
this.currentBGM = type;
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "4764f1a4-4e46-4c19-b03c-8f4b21b25cb8",
"files": [],
"subMetas": {},
"userData": {}
}

91
assets/script/Fruit.ts Normal file
View File

@@ -0,0 +1,91 @@
import {
_decorator,
Component,
Sprite,
SpriteFrame,
UITransform,
Size,
CircleCollider2D,
Contact2DType,
IPhysics2DContact,
RigidBody2D,
Vec2,
Node,
} from "cc";
import { FRUITS, MAX_LEVEL } from "./FruitConfig";
import { GameManager } from "./GameManager";
const { ccclass, property } = _decorator;
@ccclass("Fruit")
export class Fruit extends Component {
@property
level = 1; // 1..MAX_LEVEL
@property(Sprite)
sprite!: Sprite;
game!: GameManager;
collider!: CircleCollider2D;
body!: RigidBody2D;
// 防止同一对重复合成
merging = false;
removed = false;
init(level: number, spriteFrame: SpriteFrame, game: GameManager) {
this.level = level;
this.game = game;
if (!this.sprite) this.sprite = this.getComponent(Sprite)!;
this.sprite.spriteFrame = spriteFrame;
const def = FRUITS[this.level - 1];
const ui = this.getComponent(UITransform)!;
ui.setContentSize(new Size(def.radius * 2, def.radius * 2));
this.collider = this.getComponent(CircleCollider2D)!;
this.collider.radius = def.radius;
this.body = this.getComponent(RigidBody2D)!;
this.body.enabled = true;
this.merging = false;
this.removed = false;
}
onEnable() {
const col = this.getComponent(CircleCollider2D);
if (col) col.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
}
onDisable() {
const col = this.getComponent(CircleCollider2D);
if (col) col.off(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
}
private onBeginContact(
selfCol: CircleCollider2D,
otherCol: CircleCollider2D,
_contact: IPhysics2DContact | null
) {
if (this.removed || this.merging) return;
const otherNode = otherCol.node as Node;
const otherFruit = otherNode.getComponent(Fruit);
if (!otherFruit || otherFruit.removed || otherFruit.merging) return;
// 仅同级可合成,且不能超过最大级
if (otherFruit.level !== this.level || this.level >= MAX_LEVEL) return;
// 为避免两者都合成,使用 uuid 决定触发者(只让“较小”的触发)
if (this.node.uuid > otherNode.uuid) return;
this.merging = true;
otherFruit.merging = true;
// 合成到下一级
const nextLevel = this.level + 1;
const wpA = this.node.worldPosition;
const wpB = otherNode.worldPosition;
const mid = wpA.clone().add(wpB).multiplyScalar(0.5);
this.game.spawnMerged(nextLevel, mid, this, otherFruit);
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "bb6094b3-338a-441c-a827-32edc145dc63",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,59 @@
// assets/scripts/FruitConfig.ts
import { SpriteFrame } from "cc";
export interface FruitDef {
level: number; // 1..MAX
name: string;
radius: number; // 物理半径(像素)
score: number; // 合成到该等级获得的分数
sprite?: SpriteFrame; // 运行时由 GameManager 注入
}
export const MAX_LEVEL = 11; // 西瓜
// 半径与分数可按手感微调(半径越大越难堆)
export const FRUITS: FruitDef[] = [
{ level: 1, name: "樱桃", radius: 26, score: 1 },
{ level: 2, name: "草莓", radius: 30, score: 2 },
{ level: 3, name: "葡萄", radius: 34, score: 4 },
{ level: 4, name: "橘子", radius: 38, score: 8 },
{ level: 5, name: "柠檬", radius: 44, score: 16 },
{ level: 6, name: "猕猴桃", radius: 50, score: 24 },
{ level: 7, name: "番茄", radius: 58, score: 36 },
{ level: 8, name: "桃子", radius: 66, score: 48 },
{ level: 9, name: "菠萝", radius: 74, score: 64 },
{ level: 10, name: "哈密瓜", radius: 84, score: 96 },
{ level: 11, name: "西瓜", radius: 96, score: 128 },
];
export function clampLevel(lv: number) {
if (lv < 1) return 1;
if (lv > MAX_LEVEL) return MAX_LEVEL;
return lv;
}
// export function randomStartLevel(min=1, max=5) {
// const a = Math.max(1, Math.min(MAX_LEVEL-1, min));
// const b = Math.max(a, Math.min(MAX_LEVEL-1, max));
// return Math.floor(Math.random() * (b - a + 1)) + a;
// }
export function randomStartLevel(
minLevel: number,
maxLevel: number,
score: number
): number {
let level = Math.floor(Math.random() * (maxLevel - minLevel + 1)) + minLevel;
// 高分奖励机制:比如 score >= 50 时,有 20% 概率出现 maxLevel+1 的水果
if (score >= 800 && Math.random() < 0.2) {
level = Math.min(level + 1, FRUITS.length);
}
// 高分再加概率,可根据需求增加更高级水果
if (score >= 1500 && Math.random() < 0.1) {
level = Math.min(level + 2, FRUITS.length);
}
return level;
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "0597dd34-c555-4e0c-8c81-f662a8e41a20",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,468 @@
import {
_decorator,
Component,
Node,
Prefab,
SpriteFrame,
input,
Input,
NodePool,
Script,
Sprite,
UITransform,
v3,
Vec3,
math,
Vec2,
instantiate,
RigidBody2D,
tween,
ERigidBody2DType,
CircleCollider2D,
PhysicsSystem2D,
sys,
Label,
UIOpacity,
director,
ParticleSystem2D,
Color,
EventTouch,
view,
AudioClip,
} from "cc";
import { AudioManager, BGMType, SFXType } from "./AudioManager";
import { Fruit } from "./Fruit";
const { ccclass, property } = _decorator;
import { FRUITS, clampLevel, randomStartLevel } from "./FruitConfig";
@ccclass("GameManager")
export class GameManager extends Component {
@property(Prefab)
fruitPrefab!: Prefab; // 统一水果预制
@property([SpriteFrame])
fruitSprites: SpriteFrame[] = []; // 长度需 >= FRUITS.length按等级顺序
@property(Node)
fruitRoot!: Node;
@property(Node)
dropLine!: Node;
@property(Node)
preview!: Node; // 顶部预览点,挂 Sprite
@property(Node)
nextPreview!: Node;
@property(Node)
topSensor!: Node;
@property(Node)
resultNode: Node = null;
@property(Label)
resultLabel: Label = null;
@property(Label)
scoreLabel!: Label;
@property(Label)
bestLabel!: Label;
@property(Prefab)
explosionPrefab: Prefab = null!;
@property(AudioClip)
mergeSFX: AudioClip = null!;
@property(AudioClip)
failSFX: AudioClip = null!;
@property(AudioClip)
victorySFX: AudioClip = null!;
@property(AudioClip)
playBgm: AudioClip = null;
// —— 可调参数 ——
@property
previewY = 560; // 预览/下落的 Y根据分辨率调整
@property
randomStartMaxLevel = 5; // 随机初级水果最大等级
@property
previewClampPadding = 40; // 贴边留白
@property
spawnCooldown = 1; // 连续投掷冷却
dangerOn = false;
// —— 运行时状态 ——
nextLevel = 1; // 将要投的等级
queuedLevel = 1; // 下一颗的预告
canDrop = true;
isGameOver = false;
score = 0;
best = 0;
private pool = new NodePool();
onLoad() {
AudioManager.instance.registerBGM(BGMType.Play, this.playBgm);
AudioManager.instance.registerSFX(SFXType.Merge, this.mergeSFX);
AudioManager.instance.registerSFX(SFXType.Fail, this.failSFX);
AudioManager.instance.registerSFX(SFXType.Victory, this.victorySFX);
AudioManager.instance.setCurBgm(BGMType.Play);
AudioManager.instance.playBGM(BGMType.Play);
for (let i = 0; i < FRUITS.length; i++) {
FRUITS[i].sprite = this.fruitSprites[i] || FRUITS[i].sprite;
}
this.best = Number(sys.localStorage.getItem("best") || 0);
if (this.bestLabel) this.bestLabel.string = `${this.best}`;
if (this.scoreLabel) this.scoreLabel.string = `0`;
}
protected onDestroy() {
this.unbindInput();
}
start() {
this.bindInput();
this.reset();
PhysicsSystem2D.instance.gravity = new Vec2(0, -800);
}
bindInput() {
input.on(Input.EventType.TOUCH_MOVE, this.onMove, this);
input.on(Input.EventType.TOUCH_START, this.onMove, this); // 触摸开始也更新预览位置
input.on(Input.EventType.TOUCH_END, this.onDrop, this);
}
unbindInput() {
input.off(Input.EventType.TOUCH_MOVE, this.onMove, this);
input.off(Input.EventType.TOUCH_START, this.onMove, this);
input.off(Input.EventType.TOUCH_END, this.onDrop, this);
}
reset() {
this.isGameOver = false;
this.canDrop = true;
// TODO 分数
this.updateScore(0);
// 清场(放回对象池而非直接删)
const children = [...this.fruitRoot.children];
for (const c of children) this.recycleFruit(c);
// 初始化两个预报等级
this.nextLevel = randomStartLevel(1, this.randomStartMaxLevel, this.score);
this.queuedLevel = randomStartLevel(
1,
this.randomStartMaxLevel,
this.score
);
this.refreshPreview();
this.refreshNextPreview();
this.setDanger(false);
}
setDanger(on: boolean) {
this.dangerOn = on;
}
recycleFruit(node: Node) {
const fr = node.getComponent(Fruit);
if (fr) fr.removed = true;
node.removeFromParent();
this.pool.put(node);
}
refreshPreview() {
const sp = this.preview.getComponent(Sprite);
const def = FRUITS[this.nextLevel - 1];
sp.spriteFrame = def.sprite!;
const ui = this.preview.getComponent(UITransform)!;
ui.setContentSize(def.radius * 2, def.radius * 2);
// 初始位置居中(仅设置 XY 固定在预览线)
const p = this.preview.position;
this.preview.active = true;
this.preview.setPosition(v3(0, this.previewY, p.z));
}
refreshNextPreview() {
const sp = this.nextPreview.getComponent(Sprite);
const def = FRUITS[this.queuedLevel - 1];
sp.spriteFrame = def.sprite!;
const ui = this.nextPreview.getComponent(UITransform)!;
ui.setContentSize(def.radius * 2, def.radius * 2);
// 初始位置居中(仅设置 XY 固定在预览线)
const p = this.nextPreview.position;
this.nextPreview.active = true;
// this.nextPreview.setPosition(v3(100, this.previewY, p.z));
}
onMove(e: EventTouch) {
if (this.isGameOver) return;
const screenPos = e.getUILocation();
const canvasUI = this.node.getComponent(UITransform)!;
const localPos = canvasUI.convertToNodeSpaceAR(
new Vec3(screenPos.x, screenPos.y, 0)
);
// 获取预览水果世界宽度
const fruitWorldWidth =
this.preview.getComponent(UITransform)!.contentSize.width *
this.preview.worldScale.x;
// 获取 Canvas 世界半宽
const canvasWorldHalfWidth = view.getVisibleSize().width / 2;
const clampedX = math.clamp(
localPos.x,
-canvasWorldHalfWidth + fruitWorldWidth / 2,
canvasWorldHalfWidth - fruitWorldWidth / 2
);
this.preview.setPosition(
v3(clampedX, this.previewY, this.preview.position.z)
);
}
onDrop() {
if (this.isGameOver || !this.canDrop) return;
// 禁止再次投掷
this.canDrop = false;
// 当前水果下落位置
const dropPos = this.preview.worldPosition;
// 1⃣ 生成当前水果
this.spawnFruit(this.nextLevel, dropPos);
// 2⃣ 隐藏预览,防止连续操作
this.preview.active = false;
// 3⃣ 延迟 1 秒刷新队列和显示预览
this.scheduleOnce(() => {
// 队列前移
this.nextLevel = this.queuedLevel;
this.queuedLevel = randomStartLevel(
1,
this.randomStartMaxLevel,
this.score
);
// 刷新预览
this.refreshPreview();
this.refreshNextPreview();
this.preview.active = true;
// 恢复投掷
this.canDrop = true;
}, 0.6); // 延迟 1 秒
}
spawnFruit(level: number, worldPos: Vec3, inheritVel?: Vec2) {
// 1⃣ 获取节点:从对象池或者实例化
const node =
this.pool.size() > 0 ? this.pool.get()! : instantiate(this.fruitPrefab);
node.parent = this.fruitRoot;
node.active = true;
// 2⃣ 获取水果半宽(世界显示宽度)
const fruitRadius = FRUITS[level - 1].radius;
const fruitUI = node.getComponent(UITransform)!;
const fruitHalfWidth = (fruitUI.contentSize.width * node.worldScale.x) / 2;
// 3⃣ 获取 Canvas / Root 容器缩放比例
const rootUI = this.fruitRoot.getComponent(UITransform)!;
const canvasScaleX = view.getVisibleSize().width / rootUI.contentSize.width;
const halfRootW = (rootUI.contentSize.width * canvasScaleX) / 2;
// 4⃣ 转换到 FruitRoot 坐标系
const local = rootUI.convertToNodeSpaceAR(worldPos.clone());
// 5⃣ 限制 X 坐标不超出屏幕边界
local.x = math.clamp(
local.x,
-halfRootW + fruitHalfWidth,
halfRootW - fruitHalfWidth
);
// 6⃣ 设置初始位置、缩放、旋转
node.setPosition(local);
node.setScale(1, 1, 1);
node.setRotationFromEuler(0, 0, 0);
// 7⃣ 初始化组件
const fruit = node.getComponent(Fruit)!;
const index = Math.max(0, Math.min(level - 1, FRUITS.length - 1));
const sf = FRUITS[index].sprite!;
fruit.init(level, sf, this);
// 8⃣ 物理恢复
const rb = node.getComponent(RigidBody2D)!;
rb.enabled = true;
rb.linearVelocity = inheritVel || new Vec2(0, -10);
rb.angularVelocity = 0;
const col = node.getComponent(CircleCollider2D)!;
if (col) col.enabled = true;
// 9⃣ 出场缩放动画
node.setScale(0.9, 0.9, 1);
tween(node)
.to(0.1, { scale: v3(1, 1, 1) })
.start();
return fruit;
}
updateScore(v: number) {
this.score = v;
if (this.scoreLabel) this.scoreLabel.string = `${this.score}`;
if (this.score > this.best) {
this.best = this.score;
sys.localStorage.setItem("best", String(this.best));
}
if (this.bestLabel) this.bestLabel.string = `${this.best}`;
}
// 被 Fruit 调用:把两颗同级水果合成到 nextLevel
spawnMerged(nextLevel: number, worldMid: Vec3, a: Fruit, b: Fruit) {
if (this.isGameOver) return;
// 读两者速度,合成后给一个小的向上速度,避免“坍塌”
const va = a.getComponent(RigidBody2D)!.linearVelocity;
const vb = b.getComponent(RigidBody2D)!.linearVelocity;
// const inherit = new Vec2(
// (va.x + vb.x) * 0.25,
// Math.max(120, (va.y + vb.y) * 0.25)
// );
const inherit = new Vec2(
(va.x + vb.x) * 0.25,
Math.max(3, (va.y + vb.y) * 0.25) // 至少往上轻推一点
);
// 回收/删除旧的
this.recycleFruit(a.node);
this.recycleFruit(b.node);
// 生成新的
const f = this.spawnFruit(clampLevel(nextLevel), worldMid, inherit);
// 计分:按目标等级给分
this.updateScore(this.score + FRUITS[clampLevel(nextLevel) - 1].score);
const explosion = instantiate(this.explosionPrefab);
const canvas = director.getScene().getChildByName("Canvas")!;
canvas.addChild(explosion);
explosion.setWorldPosition(worldMid);
explosion.setSiblingIndex(canvas.children.length - 1);
const ps = explosion.getComponent(ParticleSystem2D);
if (ps) {
ps.resetSystem();
const brightColors = [
new Color(255, 255, 0), // 黄色
new Color(255, 128, 0), // 橙色
new Color(255, 0, 0), // 红色
new Color(0, 255, 255), // 青色
new Color(128, 0, 255), // 紫色
];
// 随机给粒子选择颜色
ps.startColor =
brightColors[Math.floor(Math.random() * brightColors.length)];
// 可选:结束颜色渐变为透明
ps.endColor = new Color(
ps.startColor.r,
ps.startColor.g,
ps.startColor.b,
0
);
}
this.scheduleOnce(() => {
explosion.destroy();
}, 1.5); // 粒子持续时间
const circle = new Node();
const sp = circle.addComponent(Sprite);
sp.spriteFrame = this.fruitSprites[nextLevel - 1]; // 你可以换一张发光圈贴图
circle.parent = this.fruitRoot;
circle.setPosition(worldMid);
circle.setScale(0, 0, 1);
// 添加透明度组件
const uiOpacity = circle.addComponent(UIOpacity);
uiOpacity.opacity = 255;
// 并行动画:缩放 + 渐隐
tween(circle)
.to(0.3, { scale: v3(2, 2, 1) })
.call(() => circle.destroy())
.start();
tween(uiOpacity).to(0.3, { opacity: 0 }).start();
// 合成特效:放大闪烁
const n = f.node;
const s0 = n.scale.clone();
tween(n)
.to(0.06, { scale: v3(s0.x * 1.15, s0.y * 1.15, 1) })
.to(0.08, { scale: v3(1, 1, 1) })
.start();
AudioManager.instance.playSFX(SFXType.Merge);
// const nextFruit = FRUITS[nextLevel+1].name
// if(nextFruit === '西瓜') this.gameOver(true)
// 音效:合成
// this.playSfx(0.2);
}
gameOver(success = false) {
if (this.isGameOver) return;
this.isGameOver = true;
this.canDrop = false;
this.setDanger(true);
// 所有水果轻微变暗/缩放(可选)
// this.fruitRoot.children.forEach((n) =>
// tween(n).to(0.2, { scale: v3(0.95, 0.95, 1) }).start()
// );
// AudioManager.instance.playSFX(SFXType.Fail);
this.resultShow(success);
// 失败音
// this.playSfx(0.35);
}
resultShow(success: boolean) {
this.resultNode.active = true;
if (!success) {
AudioManager.instance.playSFX(SFXType.Fail);
this.resultLabel.string = "哎萌巴巴";
} else {
AudioManager.instance.playSFX(SFXType.Victory);
this.resultLabel.string = "恭喜哎萌";
}
}
startNewGame() {
director.loadScene("game");
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "15d78db8-b272-49f3-af02-b806dfda026d",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,58 @@
import { _decorator, Component, BoxCollider2D, Contact2DType, IPhysics2DContact, Node, Color, find, director } from 'cc';
import { Fruit } from './Fruit';
import { GameManager } from './GameManager';
const { ccclass, property } = _decorator;
@ccclass('TopSensor')
export class TopSensor extends Component {
game!: GameManager;
@property
holdSeconds = 2.0; // 触顶持续秒数
private touching = new Map<Node, number>(); // node -> enterTime
onLoad(){
const canvas = director.getScene().getChildByName("Canvas");
// 2. 获取 Game 节点
const gameNode = canvas.getChildByName("Game");
// 3. 获取 GameManager 脚本
this.game = gameNode.getComponent(GameManager);
}
onEnable() {
const col = this.getComponent(BoxCollider2D)!;
col.sensor = true;
col.on(Contact2DType.BEGIN_CONTACT, this.onBegin, this);
col.on(Contact2DType.END_CONTACT, this.onEnd, this);
}
onDisable() {
const col = this.getComponent(BoxCollider2D)!;
col.off(Contact2DType.BEGIN_CONTACT, this.onBegin, this);
col.off(Contact2DType.END_CONTACT, this.onEnd, this);
}
private onBegin(_self: BoxCollider2D, other: any, _c: IPhysics2DContact | null) {
const f = (other.node as Node).getComponent(Fruit);
if (f) this.touching.set(other.node, performance.now() / 1000);
}
private onEnd(_self: BoxCollider2D, other: any) {
this.touching.delete(other.node);
}
update() {
if (!this.game || this.game.isGameOver) return;
const now = performance.now() / 1000;
for (const [node, t] of this.touching) {
if (now - t >= this.holdSeconds) {
this.game.gameOver();
break;
}
}
// 可选:把状态交给 GameManager 显示红线闪烁
// this.game.setDanger(this.touching.size > 0);
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "176fd316-a8b3-4dda-8b7d-36a3cf09f4e7",
"files": [],
"subMetas": {},
"userData": {}
}

7
package.json Executable file
View File

@@ -0,0 +1,7 @@
{
"name": "watermelon",
"uuid": "59d7b93c-1194-4903-af6e-cd37d5fa509a",
"creator": {
"version": "3.8.6"
}
}

View File

@@ -0,0 +1,3 @@
{
"__version__": "1.3.9"
}

View File

@@ -0,0 +1,23 @@
{
"__version__": "3.0.9",
"game": {
"name": "未知游戏",
"app_id": "UNKNOW",
"c_id": "0"
},
"appConfigMaps": [
{
"app_id": "UNKNOW",
"config_id": "5b2d5d"
}
],
"configs": [
{
"app_id": "UNKNOW",
"config_id": "5b2d5d",
"config_name": "Default",
"config_remarks": "",
"services": []
}
]
}

View File

@@ -0,0 +1,3 @@
{
"__version__": "1.0.1"
}

View File

@@ -0,0 +1,225 @@
{
"__version__": "1.0.12",
"modules": {
"configs": {
"defaultConfig": {
"name": "Default Config",
"cache": {
"base": {
"_value": true
},
"gfx-webgl": {
"_value": true
},
"gfx-webgl2": {
"_value": true
},
"gfx-webgpu": {
"_value": false
},
"animation": {
"_value": true
},
"skeletal-animation": {
"_value": false
},
"3d": {
"_value": false
},
"meshopt": {
"_value": false
},
"2d": {
"_value": true
},
"xr": {
"_value": false
},
"rich-text": {
"_value": true
},
"mask": {
"_value": true
},
"graphics": {
"_value": true
},
"ui-skew": {
"_value": false
},
"affine-transform": {
"_value": true
},
"ui": {
"_value": true
},
"particle": {
"_value": false
},
"physics": {
"_value": false,
"_option": "physics-ammo"
},
"physics-ammo": {
"_value": false,
"_flags": {
"LOAD_BULLET_MANUALLY": false
}
},
"physics-cannon": {
"_value": false
},
"physics-physx": {
"_value": false,
"_flags": {
"LOAD_PHYSX_MANUALLY": false
}
},
"physics-builtin": {
"_value": false
},
"physics-2d": {
"_value": true,
"_option": "physics-2d-box2d"
},
"physics-2d-box2d": {
"_value": false
},
"physics-2d-box2d-wasm": {
"_value": false,
"_flags": {
"LOAD_BOX2D_MANUALLY": false
}
},
"physics-2d-builtin": {
"_value": false
},
"physics-2d-box2d-jsb": {
"_value": false
},
"intersection-2d": {
"_value": true
},
"primitive": {
"_value": false
},
"profiler": {
"_value": true
},
"occlusion-query": {
"_value": false
},
"geometry-renderer": {
"_value": false
},
"debug-renderer": {
"_value": false
},
"particle-2d": {
"_value": true
},
"audio": {
"_value": true
},
"video": {
"_value": true
},
"webview": {
"_value": true
},
"tween": {
"_value": true
},
"websocket": {
"_value": false
},
"websocket-server": {
"_value": false
},
"terrain": {
"_value": false
},
"light-probe": {
"_value": false
},
"tiled-map": {
"_value": true
},
"vendor-google": {
"_value": false
},
"spine": {
"_value": true,
"_option": "spine-3.8"
},
"spine-3.8": {
"_value": true,
"_flags": {
"LOAD_SPINE_MANUALLY": false
}
},
"spine-4.2": {
"_value": false,
"_flags": {
"LOAD_SPINE_MANUALLY": false
}
},
"dragon-bones": {
"_value": true
},
"marionette": {
"_value": false
},
"procedural-animation": {
"_value": false
},
"custom-pipeline-post-process": {
"_value": false
},
"render-pipeline": {
"_value": true,
"_option": "custom-pipeline"
},
"custom-pipeline": {
"_value": true
},
"legacy-pipeline": {
"_value": false
}
},
"flags": {
"LOAD_SPINE_MANUALLY": false
},
"includeModules": [
"2d",
"affine-transform",
"animation",
"audio",
"base",
"custom-pipeline",
"dragon-bones",
"gfx-webgl",
"gfx-webgl2",
"graphics",
"intersection-2d",
"mask",
"particle-2d",
"physics-2d-box2d",
"profiler",
"rich-text",
"spine-3.8",
"tiled-map",
"tween",
"ui",
"video",
"webview"
],
"noDeprecatedFeatures": {
"value": false,
"version": ""
}
}
},
"globalConfigKey": "defaultConfig"
}
}

View File

@@ -0,0 +1,23 @@
{
"__version__": "1.0.1",
"information": {
"customSplash": {
"id": "customSplash",
"label": "customSplash",
"enable": false,
"customSplash": {
"complete": false,
"form": "https://creator-api.cocos.com/api/form/show?"
}
},
"removeSplash": {
"id": "removeSplash",
"label": "removeSplash",
"enable": false,
"removeSplash": {
"complete": false,
"form": "https://creator-api.cocos.com/api/form/show?"
}
}
}
}

View File

@@ -0,0 +1,3 @@
{
"__version__": "1.0.4"
}

View File

@@ -0,0 +1,11 @@
{
"__version__": "1.0.6",
"general": {
"designResolution": {
"width": 720,
"height": 1280,
"fitHeight": true,
"fitWidth": false
}
}
}

9
tsconfig.json Normal file
View File

@@ -0,0 +1,9 @@
{
/* Base configuration. Do not edit this field. */
"extends": "./temp/tsconfig.cocos.json",
/* Add your custom configuration here. */
"compilerOptions": {
"strict": false
}
}