This commit is contained in:
2024-05-01 19:13:01 +08:00
parent cf008327aa
commit 80a32d9b1b
150 changed files with 8561 additions and 5045 deletions

BIN
assets/.DS_Store vendored

Binary file not shown.

Binary file not shown.

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Click Effect",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Click Effect",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -55,6 +55,7 @@
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -62,15 +63,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -79,9 +78,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -104,9 +103,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "7f560c03-1db2-49db-abb7-65e14eed3ef5"
},
"_atlas": null,
"_id": ""
},
{
@@ -117,6 +114,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -127,11 +125,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "71a28c77-5924-40de-9a2e-df84682de9a6"
"__uuid__": "71a28c77-5924-40de-9a2e-df84682de9a6",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "71a28c77-5924-40de-9a2e-df84682de9a6"
"__uuid__": "71a28c77-5924-40de-9a2e-df84682de9a6",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -143,6 +143,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -150,7 +151,8 @@
"__prefab": {
"__id__": 7
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -160,6 +162,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -167,7 +170,6 @@
"__prefab": {
"__id__": 9
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
@@ -177,7 +179,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -191,6 +194,8 @@
"asset": {
"__id__": 0
},
"fileId": "04Iog1bgRF3oo4bMCXFBTg"
"fileId": "04Iog1bgRF3oo4bMCXFBTg",
"instance": null,
"targetOverrides": null
}
]

Binary file not shown.

BIN
assets/FishSingle/fish/pic/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.26",
"importer": "image",
"imported": true,
"uuid": "c6812ce7-61f0-40f9-aa8f-d1121cc713df",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "c6812ce7-61f0-40f9-aa8f-d1121cc713df@6c48a",
"displayName": "weapon_level_5_0",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "c6812ce7-61f0-40f9-aa8f-d1121cc713df",
"visible": false
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "c6812ce7-61f0-40f9-aa8f-d1121cc713df@f9941",
"displayName": "weapon_level_5_0",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 57,
"height": 75,
"rawWidth": 57,
"rawHeight": 75,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-28.5,
-37.5,
0,
28.5,
-37.5,
0,
-28.5,
37.5,
0,
28.5,
37.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
75,
57,
75,
0,
0,
57,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-28.5,
-37.5,
0
],
"maxPos": [
28.5,
37.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "c6812ce7-61f0-40f9-aa8f-d1121cc713df@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "c6812ce7-61f0-40f9-aa8f-d1121cc713df@f9941"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

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

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish1",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish1",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -60,10 +60,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 3,
"y": 3,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -71,15 +72,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -88,9 +87,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -101,7 +100,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "93c2f724-ed94-4f0c-a8ca-7f6a303c15be@9755b"
"__uuid__": "93c2f724-ed94-4f0c-a8ca-7f6a303c15be@9755b",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -116,7 +116,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "93c2f724-ed94-4f0c-a8ca-7f6a303c15be"
"__uuid__": "93c2f724-ed94-4f0c-a8ca-7f6a303c15be",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -128,6 +129,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -161,6 +163,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -171,11 +174,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "f0d73212-6204-4066-a320-9f69893989cd"
"__uuid__": "f0d73212-6204-4066-a320-9f69893989cd",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "f0d73212-6204-4066-a320-9f69893989cd"
"__uuid__": "f0d73212-6204-4066-a320-9f69893989cd",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -187,16 +192,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 1,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 9
}
},
"fishType": 1,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -206,14 +212,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 11
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -223,6 +230,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -230,7 +238,8 @@
"__prefab": {
"__id__": 13
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -240,6 +249,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -247,7 +257,6 @@
"__prefab": {
"__id__": 15
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 72,
@@ -257,7 +266,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -271,6 +281,8 @@
"asset": {
"__id__": 0
},
"fileId": "famL4PhGRFkopG4SNLzIh+"
"fileId": "famL4PhGRFkopG4SNLzIh+",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish10",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish10",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -60,10 +60,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 3,
"y": 3,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -71,15 +72,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -88,9 +87,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -101,7 +100,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "d2126827-fe71-4739-9c2e-eead63785b23@e6f1d"
"__uuid__": "d2126827-fe71-4739-9c2e-eead63785b23@e6f1d",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -116,7 +116,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "d2126827-fe71-4739-9c2e-eead63785b23"
"__uuid__": "d2126827-fe71-4739-9c2e-eead63785b23",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -128,6 +129,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -161,6 +163,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -171,11 +174,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "e17a527d-4428-40a7-9683-7ad523432897"
"__uuid__": "e17a527d-4428-40a7-9683-7ad523432897",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "e17a527d-4428-40a7-9683-7ad523432897"
"__uuid__": "e17a527d-4428-40a7-9683-7ad523432897",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -187,16 +192,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 10,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 9
}
},
"fishType": 10,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -206,14 +212,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 11
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -223,6 +230,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -230,7 +238,8 @@
"__prefab": {
"__id__": 13
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -240,6 +249,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -247,7 +257,6 @@
"__prefab": {
"__id__": 15
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 118,
@@ -257,7 +266,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -271,6 +281,8 @@
"asset": {
"__id__": 0
},
"fileId": "famL4PhGRFkopG4SNLzIh+"
"fileId": "famL4PhGRFkopG4SNLzIh+",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish11",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish11",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -60,10 +60,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 3,
"y": 3,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -71,15 +72,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -88,9 +87,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -101,7 +100,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "065231ca-a207-4363-bba0-7786e89733cc@5a942"
"__uuid__": "065231ca-a207-4363-bba0-7786e89733cc@5a942",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -116,7 +116,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "065231ca-a207-4363-bba0-7786e89733cc"
"__uuid__": "065231ca-a207-4363-bba0-7786e89733cc",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -128,6 +129,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -161,6 +163,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -171,11 +174,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "5d6f772a-d206-41b3-88d7-af08f2a9c337"
"__uuid__": "5d6f772a-d206-41b3-88d7-af08f2a9c337",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "5d6f772a-d206-41b3-88d7-af08f2a9c337"
"__uuid__": "5d6f772a-d206-41b3-88d7-af08f2a9c337",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -187,16 +192,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 11,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 9
}
},
"fishType": 11,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -206,14 +212,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 11
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -223,6 +230,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -230,7 +238,8 @@
"__prefab": {
"__id__": 13
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -240,6 +249,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -247,7 +257,6 @@
"__prefab": {
"__id__": 15
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 106,
@@ -257,7 +266,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -271,6 +281,8 @@
"asset": {
"__id__": 0
},
"fileId": "famL4PhGRFkopG4SNLzIh+"
"fileId": "famL4PhGRFkopG4SNLzIh+",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish12",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish12",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -60,10 +60,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 3,
"y": 3,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -71,15 +72,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -88,9 +87,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -101,7 +100,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "2e4e01b9-8a30-4d74-8aed-1b2704a795cc@f3e0e"
"__uuid__": "2e4e01b9-8a30-4d74-8aed-1b2704a795cc@f3e0e",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -116,7 +116,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "2e4e01b9-8a30-4d74-8aed-1b2704a795cc"
"__uuid__": "2e4e01b9-8a30-4d74-8aed-1b2704a795cc",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -128,6 +129,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -161,6 +163,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -171,11 +174,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "71cb744b-ea83-4d5a-8516-215e397dfdaa"
"__uuid__": "71cb744b-ea83-4d5a-8516-215e397dfdaa",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "71cb744b-ea83-4d5a-8516-215e397dfdaa"
"__uuid__": "71cb744b-ea83-4d5a-8516-215e397dfdaa",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -187,16 +192,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 12,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 9
}
},
"fishType": 12,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -206,14 +212,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 11
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -223,6 +230,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -230,7 +238,8 @@
"__prefab": {
"__id__": 13
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -240,6 +249,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -247,7 +257,6 @@
"__prefab": {
"__id__": 15
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 140,
@@ -257,7 +266,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -271,6 +281,8 @@
"asset": {
"__id__": 0
},
"fileId": "famL4PhGRFkopG4SNLzIh+"
"fileId": "famL4PhGRFkopG4SNLzIh+",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish13",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish13",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -60,10 +60,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 2,
"y": 2,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -71,15 +72,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -88,9 +87,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -101,7 +100,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "352c9803-6c53-4d8f-ba10-deec62a91cda@11aa1"
"__uuid__": "352c9803-6c53-4d8f-ba10-deec62a91cda@11aa1",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -116,7 +116,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "352c9803-6c53-4d8f-ba10-deec62a91cda"
"__uuid__": "352c9803-6c53-4d8f-ba10-deec62a91cda",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -128,6 +129,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -161,6 +163,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -171,11 +174,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "42b329aa-ff32-47cd-8b3c-88b068c0dfb3"
"__uuid__": "42b329aa-ff32-47cd-8b3c-88b068c0dfb3",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "42b329aa-ff32-47cd-8b3c-88b068c0dfb3"
"__uuid__": "42b329aa-ff32-47cd-8b3c-88b068c0dfb3",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -187,16 +192,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 13,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 9
}
},
"fishType": 13,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -206,14 +212,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 11
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -223,6 +230,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -230,7 +238,8 @@
"__prefab": {
"__id__": 13
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -240,6 +249,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -247,7 +257,6 @@
"__prefab": {
"__id__": 15
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 187,
@@ -257,7 +266,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -271,6 +281,8 @@
"asset": {
"__id__": 0
},
"fileId": "famL4PhGRFkopG4SNLzIh+"
"fileId": "famL4PhGRFkopG4SNLzIh+",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish14",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish14",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -60,10 +60,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 3,
"y": 3,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -71,15 +72,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -88,9 +87,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -101,7 +100,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "3b3e5578-dce9-43ce-a813-9a37e0d45e48@40c7c"
"__uuid__": "3b3e5578-dce9-43ce-a813-9a37e0d45e48@40c7c",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -116,7 +116,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "3b3e5578-dce9-43ce-a813-9a37e0d45e48"
"__uuid__": "3b3e5578-dce9-43ce-a813-9a37e0d45e48",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -128,6 +129,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -161,6 +163,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -171,11 +174,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "9c12558b-de44-410f-b49f-5853230941b1"
"__uuid__": "9c12558b-de44-410f-b49f-5853230941b1",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "9c12558b-de44-410f-b49f-5853230941b1"
"__uuid__": "9c12558b-de44-410f-b49f-5853230941b1",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -187,16 +192,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 14,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 9
}
},
"fishType": 14,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -206,14 +212,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 11
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -223,6 +230,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -230,7 +238,8 @@
"__prefab": {
"__id__": 13
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -240,6 +249,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -247,7 +257,6 @@
"__prefab": {
"__id__": 15
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 72,
@@ -257,7 +266,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -271,6 +281,8 @@
"asset": {
"__id__": 0
},
"fileId": "famL4PhGRFkopG4SNLzIh+"
"fileId": "famL4PhGRFkopG4SNLzIh+",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish15",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish15",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -60,10 +60,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 2,
"y": 2,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -71,15 +72,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -88,9 +87,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -101,7 +100,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "e42f83bb-200e-445e-a9b5-7dbb8a331f57@4cf03"
"__uuid__": "e42f83bb-200e-445e-a9b5-7dbb8a331f57@4cf03",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -116,7 +116,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "e42f83bb-200e-445e-a9b5-7dbb8a331f57"
"__uuid__": "e42f83bb-200e-445e-a9b5-7dbb8a331f57",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -128,6 +129,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -161,6 +163,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -171,11 +174,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "69f18979-51b5-47d3-bfb1-0d7df4592a44"
"__uuid__": "69f18979-51b5-47d3-bfb1-0d7df4592a44",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "69f18979-51b5-47d3-bfb1-0d7df4592a44"
"__uuid__": "69f18979-51b5-47d3-bfb1-0d7df4592a44",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -187,16 +192,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 15,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 9
}
},
"fishType": 15,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -206,14 +212,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 11
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -223,6 +230,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -230,7 +238,8 @@
"__prefab": {
"__id__": 13
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -240,6 +249,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -247,7 +257,6 @@
"__prefab": {
"__id__": 15
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 280,
@@ -257,7 +266,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -271,6 +281,8 @@
"asset": {
"__id__": 0
},
"fileId": "famL4PhGRFkopG4SNLzIh+"
"fileId": "famL4PhGRFkopG4SNLzIh+",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish16",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish16",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -60,10 +60,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 2,
"y": 2,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -71,15 +72,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -88,9 +87,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -101,7 +100,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "5be2479e-33c7-4c76-93be-e25b5f6dc729@942cf"
"__uuid__": "5be2479e-33c7-4c76-93be-e25b5f6dc729@942cf",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -116,7 +116,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "5be2479e-33c7-4c76-93be-e25b5f6dc729"
"__uuid__": "5be2479e-33c7-4c76-93be-e25b5f6dc729",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -128,6 +129,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -161,6 +163,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -171,11 +174,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "71c51c0e-ec84-453b-8eec-797c3380f73c"
"__uuid__": "71c51c0e-ec84-453b-8eec-797c3380f73c",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "71c51c0e-ec84-453b-8eec-797c3380f73c"
"__uuid__": "71c51c0e-ec84-453b-8eec-797c3380f73c",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -187,16 +192,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 16,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 9
}
},
"fishType": 16,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -206,14 +212,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 11
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -223,6 +230,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -230,7 +238,8 @@
"__prefab": {
"__id__": 13
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -240,6 +249,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -247,7 +257,6 @@
"__prefab": {
"__id__": 15
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 340,
@@ -257,7 +266,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -271,6 +281,8 @@
"asset": {
"__id__": 0
},
"fileId": "famL4PhGRFkopG4SNLzIh+"
"fileId": "famL4PhGRFkopG4SNLzIh+",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish17",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish17",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
@@ -76,10 +76,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 1.5,
"y": 1.5,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -87,15 +88,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "Aura Tail",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
@@ -134,6 +133,7 @@
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -141,15 +141,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
@@ -158,9 +156,9 @@
"__id__": 4
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -171,7 +169,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "21b441a6-ca90-4dad-a919-b3a4524d720b@bd0d8"
"__uuid__": "21b441a6-ca90-4dad-a919-b3a4524d720b@bd0d8",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -186,7 +185,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "21b441a6-ca90-4dad-a919-b3a4524d720b"
"__uuid__": "21b441a6-ca90-4dad-a919-b3a4524d720b",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -198,6 +198,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
@@ -205,7 +206,8 @@
"__prefab": {
"__id__": 6
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -215,6 +217,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
@@ -222,7 +225,6 @@
"__prefab": {
"__id__": 8
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 128,
@@ -232,7 +234,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -246,12 +249,16 @@
"asset": {
"__id__": 0
},
"fileId": "e9KE2M+HlNGLuowgNFtVvB"
"fileId": "e9KE2M+HlNGLuowgNFtVvB",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "Aura Middle",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
@@ -290,6 +297,7 @@
"y": 1.4,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -297,15 +305,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 10
},
@@ -314,9 +320,9 @@
"__id__": 12
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -327,7 +333,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "21b441a6-ca90-4dad-a919-b3a4524d720b@bd0d8"
"__uuid__": "21b441a6-ca90-4dad-a919-b3a4524d720b@bd0d8",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -342,7 +349,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "21b441a6-ca90-4dad-a919-b3a4524d720b"
"__uuid__": "21b441a6-ca90-4dad-a919-b3a4524d720b",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -354,6 +362,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 10
},
@@ -361,7 +370,8 @@
"__prefab": {
"__id__": 14
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -371,6 +381,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 10
},
@@ -378,7 +389,6 @@
"__prefab": {
"__id__": 16
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 128,
@@ -388,7 +398,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -402,12 +413,16 @@
"asset": {
"__id__": 0
},
"fileId": "e8yB5mEDdNLacMF2+YdPE2"
"fileId": "e8yB5mEDdNLacMF2+YdPE2",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "Aura Head",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
@@ -446,6 +461,7 @@
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -453,15 +469,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 18
},
@@ -470,9 +484,9 @@
"__id__": 20
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -483,7 +497,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "21b441a6-ca90-4dad-a919-b3a4524d720b@bd0d8"
"__uuid__": "21b441a6-ca90-4dad-a919-b3a4524d720b@bd0d8",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -498,7 +513,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "21b441a6-ca90-4dad-a919-b3a4524d720b"
"__uuid__": "21b441a6-ca90-4dad-a919-b3a4524d720b",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -510,6 +526,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 18
},
@@ -517,7 +534,8 @@
"__prefab": {
"__id__": 22
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -527,6 +545,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 18
},
@@ -534,7 +553,6 @@
"__prefab": {
"__id__": 24
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 128,
@@ -544,7 +562,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -558,12 +577,16 @@
"asset": {
"__id__": 0
},
"fileId": "c8pMDib3FCu60byqzGdcvX"
"fileId": "c8pMDib3FCu60byqzGdcvX",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "Fish Tail",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
@@ -605,6 +628,7 @@
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -612,15 +636,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 26
},
@@ -629,9 +651,9 @@
"__id__": 28
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -642,7 +664,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "1992ce6d-8279-48be-a1dd-2f9c3d9e7d6a@3ad0e"
"__uuid__": "1992ce6d-8279-48be-a1dd-2f9c3d9e7d6a@3ad0e",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -657,7 +680,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "1992ce6d-8279-48be-a1dd-2f9c3d9e7d6a"
"__uuid__": "1992ce6d-8279-48be-a1dd-2f9c3d9e7d6a",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -669,6 +693,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 26
},
@@ -679,11 +704,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "42335d8d-2042-4204-8772-6f3f241cbdbd"
"__uuid__": "42335d8d-2042-4204-8772-6f3f241cbdbd",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "42335d8d-2042-4204-8772-6f3f241cbdbd"
"__uuid__": "42335d8d-2042-4204-8772-6f3f241cbdbd",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -695,6 +722,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 26
},
@@ -702,7 +730,8 @@
"__prefab": {
"__id__": 32
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -712,6 +741,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 26
},
@@ -719,7 +749,6 @@
"__prefab": {
"__id__": 34
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 88,
@@ -729,7 +758,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -743,12 +773,16 @@
"asset": {
"__id__": 0
},
"fileId": "d7fdXt81lDULlkr6FtD9cc"
"fileId": "d7fdXt81lDULlkr6FtD9cc",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "Fish Middle",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
@@ -790,6 +824,7 @@
"y": 2.2,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -797,15 +832,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 36
},
@@ -814,9 +847,9 @@
"__id__": 38
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -827,7 +860,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "3b3e5578-dce9-43ce-a813-9a37e0d45e48@40c7c"
"__uuid__": "3b3e5578-dce9-43ce-a813-9a37e0d45e48@40c7c",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -842,7 +876,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "3b3e5578-dce9-43ce-a813-9a37e0d45e48"
"__uuid__": "3b3e5578-dce9-43ce-a813-9a37e0d45e48",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -854,6 +889,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 36
},
@@ -864,11 +900,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "9c12558b-de44-410f-b49f-5853230941b1"
"__uuid__": "9c12558b-de44-410f-b49f-5853230941b1",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "9c12558b-de44-410f-b49f-5853230941b1"
"__uuid__": "9c12558b-de44-410f-b49f-5853230941b1",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -880,6 +918,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 36
},
@@ -887,7 +926,8 @@
"__prefab": {
"__id__": 42
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -897,6 +937,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 36
},
@@ -904,7 +945,6 @@
"__prefab": {
"__id__": 44
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 72,
@@ -914,7 +954,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -928,12 +969,16 @@
"asset": {
"__id__": 0
},
"fileId": "0aJ104ErlOB7J60SIDGmL0"
"fileId": "0aJ104ErlOB7J60SIDGmL0",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "Fish Head",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
@@ -975,6 +1020,7 @@
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -982,15 +1028,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 46
},
@@ -999,9 +1043,9 @@
"__id__": 48
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -1012,7 +1056,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "1992ce6d-8279-48be-a1dd-2f9c3d9e7d6a@3ad0e"
"__uuid__": "1992ce6d-8279-48be-a1dd-2f9c3d9e7d6a@3ad0e",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -1027,7 +1072,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "1992ce6d-8279-48be-a1dd-2f9c3d9e7d6a"
"__uuid__": "1992ce6d-8279-48be-a1dd-2f9c3d9e7d6a",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -1039,6 +1085,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 46
},
@@ -1049,11 +1096,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "42335d8d-2042-4204-8772-6f3f241cbdbd"
"__uuid__": "42335d8d-2042-4204-8772-6f3f241cbdbd",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "42335d8d-2042-4204-8772-6f3f241cbdbd"
"__uuid__": "42335d8d-2042-4204-8772-6f3f241cbdbd",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -1065,6 +1114,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 46
},
@@ -1072,7 +1122,8 @@
"__prefab": {
"__id__": 52
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -1082,6 +1133,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 46
},
@@ -1089,7 +1141,6 @@
"__prefab": {
"__id__": 54
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 88,
@@ -1099,7 +1150,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -1113,12 +1165,16 @@
"asset": {
"__id__": 0
},
"fileId": "2cGbGc0mNJp6NBBV1eaSjV"
"fileId": "2cGbGc0mNJp6NBBV1eaSjV",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -1129,11 +1185,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "d634b6d3-5dbf-48c9-a0bc-61977878c8e7"
"__uuid__": "d634b6d3-5dbf-48c9-a0bc-61977878c8e7",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "d634b6d3-5dbf-48c9-a0bc-61977878c8e7"
"__uuid__": "d634b6d3-5dbf-48c9-a0bc-61977878c8e7",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -1145,6 +1203,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -1178,16 +1237,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 17,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 61
}
},
"fishType": 17,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -1197,14 +1257,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 63
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -1214,6 +1275,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -1221,7 +1283,8 @@
"__prefab": {
"__id__": 65
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -1231,6 +1294,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -1238,7 +1302,6 @@
"__prefab": {
"__id__": 67
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 390,
@@ -1248,7 +1311,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -1262,6 +1326,8 @@
"asset": {
"__id__": 0
},
"fileId": "16XB8pfHBIELcPmfMvv/nD"
"fileId": "16XB8pfHBIELcPmfMvv/nD",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish18",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish18",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -60,10 +60,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 2,
"y": 2,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -71,15 +72,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -88,9 +87,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -101,7 +100,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "91a85e7e-2d0a-4294-8cb0-53478537bc55@6e2fd"
"__uuid__": "91a85e7e-2d0a-4294-8cb0-53478537bc55@6e2fd",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -116,7 +116,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "91a85e7e-2d0a-4294-8cb0-53478537bc55"
"__uuid__": "91a85e7e-2d0a-4294-8cb0-53478537bc55",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -128,6 +129,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -161,6 +163,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -171,11 +174,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "2485429c-f56b-4248-b865-ed51e490c8a8"
"__uuid__": "2485429c-f56b-4248-b865-ed51e490c8a8",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "2485429c-f56b-4248-b865-ed51e490c8a8"
"__uuid__": "2485429c-f56b-4248-b865-ed51e490c8a8",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -187,16 +192,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 18,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 9
}
},
"fishType": 18,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -206,14 +212,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 11
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -223,6 +230,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -230,7 +238,8 @@
"__prefab": {
"__id__": 13
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -240,6 +249,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -247,7 +257,6 @@
"__prefab": {
"__id__": 15
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
@@ -257,7 +266,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -271,6 +281,8 @@
"asset": {
"__id__": 0
},
"fileId": "famL4PhGRFkopG4SNLzIh+"
"fileId": "famL4PhGRFkopG4SNLzIh+",
"instance": null,
"targetOverrides": null
}
]

File diff suppressed because it is too large Load Diff

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish2",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish2",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -60,10 +60,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 3,
"y": 3,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -71,15 +72,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -88,9 +87,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -101,7 +100,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "9db8c528-dae8-4e5a-a35b-43406ae12486@a9841"
"__uuid__": "9db8c528-dae8-4e5a-a35b-43406ae12486@a9841",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -116,7 +116,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "9db8c528-dae8-4e5a-a35b-43406ae12486"
"__uuid__": "9db8c528-dae8-4e5a-a35b-43406ae12486",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -128,6 +129,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -161,6 +163,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -171,11 +174,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "3d05305d-6627-4e0c-9511-cd01676d144c"
"__uuid__": "3d05305d-6627-4e0c-9511-cd01676d144c",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "3d05305d-6627-4e0c-9511-cd01676d144c"
"__uuid__": "3d05305d-6627-4e0c-9511-cd01676d144c",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -187,16 +192,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 2,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 9
}
},
"fishType": 2,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -206,14 +212,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 11
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -223,6 +230,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -230,7 +238,8 @@
"__prefab": {
"__id__": 13
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -240,6 +249,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -247,7 +257,6 @@
"__prefab": {
"__id__": 15
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 82,
@@ -257,7 +266,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -271,6 +281,8 @@
"asset": {
"__id__": 0
},
"fileId": "famL4PhGRFkopG4SNLzIh+"
"fileId": "famL4PhGRFkopG4SNLzIh+",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish20",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish20",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -60,10 +60,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 2,
"y": 2,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -71,15 +72,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -88,9 +87,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -101,7 +100,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "4c39bae7-e304-433f-90d1-b01f8ce1f50d@53e28"
"__uuid__": "4c39bae7-e304-433f-90d1-b01f8ce1f50d@53e28",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -116,7 +116,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "4c39bae7-e304-433f-90d1-b01f8ce1f50d"
"__uuid__": "4c39bae7-e304-433f-90d1-b01f8ce1f50d",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -128,6 +129,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -161,6 +163,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -171,11 +174,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "27e6df97-4896-42ca-abe6-34554eee08fc"
"__uuid__": "27e6df97-4896-42ca-abe6-34554eee08fc",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "27e6df97-4896-42ca-abe6-34554eee08fc"
"__uuid__": "27e6df97-4896-42ca-abe6-34554eee08fc",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -187,16 +192,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 20,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 9
}
},
"fishType": 20,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -206,14 +212,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 11
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -223,6 +230,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -230,7 +238,8 @@
"__prefab": {
"__id__": 13
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -240,6 +249,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -247,7 +257,6 @@
"__prefab": {
"__id__": 15
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 380,
@@ -257,7 +266,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -271,6 +281,8 @@
"asset": {
"__id__": 0
},
"fileId": "famL4PhGRFkopG4SNLzIh+"
"fileId": "famL4PhGRFkopG4SNLzIh+",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish24",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish24",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
@@ -65,6 +65,7 @@
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -72,15 +73,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "Sprite",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
@@ -119,6 +118,7 @@
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -126,15 +126,13 @@
"y": 0,
"z": 90
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
@@ -143,9 +141,9 @@
"__id__": 4
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -156,7 +154,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "e0530ef6-394e-4c6c-9615-375bc9a13a21@5abcb"
"__uuid__": "e0530ef6-394e-4c6c-9615-375bc9a13a21@5abcb",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -171,7 +170,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "e0530ef6-394e-4c6c-9615-375bc9a13a21"
"__uuid__": "e0530ef6-394e-4c6c-9615-375bc9a13a21",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -183,6 +183,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
@@ -190,7 +191,8 @@
"__prefab": {
"__id__": 6
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -200,6 +202,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
@@ -207,7 +210,6 @@
"__prefab": {
"__id__": 8
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
@@ -217,7 +219,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -231,12 +234,16 @@
"asset": {
"__id__": 0
},
"fileId": "2eGfPyradLS4VS8RlEF/Fb"
"fileId": "2eGfPyradLS4VS8RlEF/Fb",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -270,6 +277,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -280,11 +288,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "063d7bdc-6650-4b40-a7f7-9afc4a3deb4a"
"__uuid__": "063d7bdc-6650-4b40-a7f7-9afc4a3deb4a",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "063d7bdc-6650-4b40-a7f7-9afc4a3deb4a"
"__uuid__": "063d7bdc-6650-4b40-a7f7-9afc4a3deb4a",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -296,16 +306,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 24,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 15
}
},
"fishType": 24,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -315,14 +326,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 17
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -332,6 +344,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -339,7 +352,8 @@
"__prefab": {
"__id__": 19
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -349,6 +363,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -356,7 +371,6 @@
"__prefab": {
"__id__": 21
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 72,
@@ -366,7 +380,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -380,6 +395,8 @@
"asset": {
"__id__": 0
},
"fileId": "275EqqIrVC+IeN9rlHGt2L"
"fileId": "275EqqIrVC+IeN9rlHGt2L",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish3",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish3",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -60,10 +60,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 3,
"y": 3,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -71,15 +72,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -88,9 +87,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -101,7 +100,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "32f9df4c-ff0f-447a-92f1-3d3aa53e8ff0@0dd99"
"__uuid__": "32f9df4c-ff0f-447a-92f1-3d3aa53e8ff0@0dd99",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -116,7 +116,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "32f9df4c-ff0f-447a-92f1-3d3aa53e8ff0"
"__uuid__": "32f9df4c-ff0f-447a-92f1-3d3aa53e8ff0",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -128,6 +129,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -161,6 +163,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -171,11 +174,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "b62b9130-675a-45a9-b65e-1b55c5814675"
"__uuid__": "b62b9130-675a-45a9-b65e-1b55c5814675",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "b62b9130-675a-45a9-b65e-1b55c5814675"
"__uuid__": "b62b9130-675a-45a9-b65e-1b55c5814675",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -187,16 +192,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 3,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 9
}
},
"fishType": 3,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -206,14 +212,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 11
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -223,6 +230,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -230,7 +238,8 @@
"__prefab": {
"__id__": 13
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -240,6 +249,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -247,7 +257,6 @@
"__prefab": {
"__id__": 15
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 48,
@@ -257,7 +266,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -271,6 +281,8 @@
"asset": {
"__id__": 0
},
"fileId": "famL4PhGRFkopG4SNLzIh+"
"fileId": "famL4PhGRFkopG4SNLzIh+",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish4",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish4",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -60,10 +60,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 3,
"y": 3,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -71,15 +72,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -88,9 +87,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -101,7 +100,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "3ccc1345-0250-41f6-8000-e754061ee84d@2ef7d"
"__uuid__": "3ccc1345-0250-41f6-8000-e754061ee84d@2ef7d",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -116,7 +116,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "3ccc1345-0250-41f6-8000-e754061ee84d"
"__uuid__": "3ccc1345-0250-41f6-8000-e754061ee84d",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -128,6 +129,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -161,6 +163,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -171,11 +174,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "d8996496-648c-4ab9-9268-c561e3f70bcc"
"__uuid__": "d8996496-648c-4ab9-9268-c561e3f70bcc",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "d8996496-648c-4ab9-9268-c561e3f70bcc"
"__uuid__": "d8996496-648c-4ab9-9268-c561e3f70bcc",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -187,16 +192,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 4,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 9
}
},
"fishType": 4,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -206,14 +212,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 11
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -223,6 +230,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -230,7 +238,8 @@
"__prefab": {
"__id__": 13
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -240,6 +249,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -247,7 +257,6 @@
"__prefab": {
"__id__": 15
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 60,
@@ -257,7 +266,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -271,6 +281,8 @@
"asset": {
"__id__": 0
},
"fileId": "famL4PhGRFkopG4SNLzIh+"
"fileId": "famL4PhGRFkopG4SNLzIh+",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish5",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish5",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -60,10 +60,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 3,
"y": 3,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -71,15 +72,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -88,9 +87,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -101,7 +100,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "ffdb3623-e0fd-4c59-aef5-acdfd6a09d44@43452"
"__uuid__": "ffdb3623-e0fd-4c59-aef5-acdfd6a09d44@43452",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -116,7 +116,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "ffdb3623-e0fd-4c59-aef5-acdfd6a09d44"
"__uuid__": "ffdb3623-e0fd-4c59-aef5-acdfd6a09d44",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -128,6 +129,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -161,6 +163,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -171,11 +174,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "cdf46818-beeb-4fa6-9de0-03dbb80970d6"
"__uuid__": "cdf46818-beeb-4fa6-9de0-03dbb80970d6",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "cdf46818-beeb-4fa6-9de0-03dbb80970d6"
"__uuid__": "cdf46818-beeb-4fa6-9de0-03dbb80970d6",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -187,16 +192,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 5,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 9
}
},
"fishType": 5,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -206,14 +212,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 11
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -223,6 +230,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -230,7 +238,8 @@
"__prefab": {
"__id__": 13
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -240,6 +249,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -247,7 +257,6 @@
"__prefab": {
"__id__": 15
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 62,
@@ -257,7 +266,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -271,6 +281,8 @@
"asset": {
"__id__": 0
},
"fileId": "famL4PhGRFkopG4SNLzIh+"
"fileId": "famL4PhGRFkopG4SNLzIh+",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish6",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish6",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -60,10 +60,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 3,
"y": 3,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -71,15 +72,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -88,9 +87,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -101,7 +100,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "1992ce6d-8279-48be-a1dd-2f9c3d9e7d6a@3ad0e"
"__uuid__": "1992ce6d-8279-48be-a1dd-2f9c3d9e7d6a@3ad0e",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -116,7 +116,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "1992ce6d-8279-48be-a1dd-2f9c3d9e7d6a"
"__uuid__": "1992ce6d-8279-48be-a1dd-2f9c3d9e7d6a",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -128,6 +129,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -161,6 +163,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -171,11 +174,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "42335d8d-2042-4204-8772-6f3f241cbdbd"
"__uuid__": "42335d8d-2042-4204-8772-6f3f241cbdbd",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "42335d8d-2042-4204-8772-6f3f241cbdbd"
"__uuid__": "42335d8d-2042-4204-8772-6f3f241cbdbd",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -187,16 +192,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 6,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 9
}
},
"fishType": 6,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -206,14 +212,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 11
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -223,6 +230,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -230,7 +238,8 @@
"__prefab": {
"__id__": 13
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -240,6 +249,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -247,7 +257,6 @@
"__prefab": {
"__id__": 15
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 88,
@@ -257,7 +266,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -271,6 +281,8 @@
"asset": {
"__id__": 0
},
"fileId": "famL4PhGRFkopG4SNLzIh+"
"fileId": "famL4PhGRFkopG4SNLzIh+",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish7",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish7",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -60,10 +60,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 1.5,
"y": 1.5,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -71,15 +72,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -88,9 +87,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -101,7 +100,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "0021d952-9879-45ad-a76b-30b82e1c6104@d1ecd"
"__uuid__": "0021d952-9879-45ad-a76b-30b82e1c6104@d1ecd",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -116,7 +116,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "0021d952-9879-45ad-a76b-30b82e1c6104"
"__uuid__": "0021d952-9879-45ad-a76b-30b82e1c6104",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -128,6 +129,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -161,6 +163,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -171,11 +174,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "4fa328b7-7054-4430-b113-7bab95ac94b3"
"__uuid__": "4fa328b7-7054-4430-b113-7bab95ac94b3",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "4fa328b7-7054-4430-b113-7bab95ac94b3"
"__uuid__": "4fa328b7-7054-4430-b113-7bab95ac94b3",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -187,16 +192,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 7,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 9
}
},
"fishType": 7,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -206,14 +212,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 11
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -223,6 +230,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -230,7 +238,8 @@
"__prefab": {
"__id__": 13
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -240,6 +249,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -247,7 +257,6 @@
"__prefab": {
"__id__": 15
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 106,
@@ -257,7 +266,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -271,6 +281,8 @@
"asset": {
"__id__": 0
},
"fileId": "famL4PhGRFkopG4SNLzIh+"
"fileId": "famL4PhGRFkopG4SNLzIh+",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish8",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish8",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -60,10 +60,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 3,
"y": 3,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -71,15 +72,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -88,9 +87,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -101,7 +100,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "0190f1af-d5b4-4053-8850-ab0e2e0b0bf2@acc0d"
"__uuid__": "0190f1af-d5b4-4053-8850-ab0e2e0b0bf2@acc0d",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -116,7 +116,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "0190f1af-d5b4-4053-8850-ab0e2e0b0bf2"
"__uuid__": "0190f1af-d5b4-4053-8850-ab0e2e0b0bf2",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -128,6 +129,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -161,6 +163,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -171,11 +174,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "b21b52a9-08e5-4869-89dd-6e1bd2b82ca2"
"__uuid__": "b21b52a9-08e5-4869-89dd-6e1bd2b82ca2",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "b21b52a9-08e5-4869-89dd-6e1bd2b82ca2"
"__uuid__": "b21b52a9-08e5-4869-89dd-6e1bd2b82ca2",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -187,16 +192,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 8,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 9
}
},
"fishType": 8,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -206,14 +212,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 11
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -223,6 +230,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -230,7 +238,8 @@
"__prefab": {
"__id__": 13
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -240,6 +249,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -247,7 +257,6 @@
"__prefab": {
"__id__": 15
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 78,
@@ -257,7 +266,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -271,6 +281,8 @@
"asset": {
"__id__": 0
},
"fileId": "famL4PhGRFkopG4SNLzIh+"
"fileId": "famL4PhGRFkopG4SNLzIh+",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -3,19 +3,19 @@
"__type__": "cc.Prefab",
"_name": "Fish9",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Fish9",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_active": true,
@@ -60,10 +60,11 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 1.5,
"y": 1.5,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
@@ -71,15 +72,13 @@
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -88,9 +87,9 @@
"__id__": 3
},
"_customMaterial": {
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8"
"__uuid__": "fda095cb-831d-4601-ad94-846013963de8",
"__expectedType__": "cc.Material"
},
"_visFlags": 0,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
@@ -101,7 +100,8 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "aed1f5f3-0643-4ad1-8536-65d1294b7db1@5f735"
"__uuid__": "aed1f5f3-0643-4ad1-8536-65d1294b7db1@5f735",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
@@ -116,7 +116,8 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "aed1f5f3-0643-4ad1-8536-65d1294b7db1"
"__uuid__": "aed1f5f3-0643-4ad1-8536-65d1294b7db1",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
@@ -128,6 +129,7 @@
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -161,6 +163,7 @@
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -171,11 +174,13 @@
"playOnLoad": false,
"_clips": [
{
"__uuid__": "b1e4a822-98c1-4dcd-8f46-dd524fad6381"
"__uuid__": "b1e4a822-98c1-4dcd-8f46-dd524fad6381",
"__expectedType__": "cc.AnimationClip"
}
],
"_defaultClip": {
"__uuid__": "b1e4a822-98c1-4dcd-8f46-dd524fad6381"
"__uuid__": "b1e4a822-98c1-4dcd-8f46-dd524fad6381",
"__expectedType__": "cc.AnimationClip"
},
"_id": ""
},
@@ -187,16 +192,17 @@
"__type__": "bcf7fDIJDhKnaxGPja2YnSj",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"fishType": 9,
"speed": 3,
"_id": "",
"__prefab": {
"__id__": 9
}
},
"fishType": 9,
"speed": 3,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -206,14 +212,15 @@
"__type__": "ce1d8SdoYxBMoB8LPTW6b6l",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"_id": "",
"__prefab": {
"__id__": 11
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -223,6 +230,7 @@
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -230,7 +238,8 @@
"__prefab": {
"__id__": 13
},
"_opacity": 255
"_opacity": 255,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -240,6 +249,7 @@
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -247,7 +257,6 @@
"__prefab": {
"__id__": 15
},
"_priority": 0,
"_contentSize": {
"__type__": "cc.Size",
"width": 126,
@@ -257,7 +266,8 @@
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -271,6 +281,8 @@
"asset": {
"__id__": 0
},
"fileId": "famL4PhGRFkopG4SNLzIh+"
"fileId": "famL4PhGRFkopG4SNLzIh+",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -1,31 +1,37 @@
import { _decorator, Component, Tween, tween } from 'cc'
const { ccclass, property } = _decorator
import { Component, Tween, _decorator, tween } from 'cc'
import { FishInfo } from '../../script/game/config/FishInfo'
import { FishPathInfo } from '../../script/game/config/FishPathInfo'
import FishManager from '../../script/game/manager/FishManager'
import { FishInfo } from '../../script/game/config/FishInfo'
import WsManager from '../../script/game/manager/WsManager'
const { ccclass, property } = _decorator
@ccclass('FishBase')
export default class FishBase extends Component {
public fishInfo: FishInfo
public fishType: number = 1
public blood: number = 1
public fishPathInfo: FishPathInfo
public isDead: boolean
onLoad() {}
start() {}
public playDeadMv() {
this.isDead = true
this.scheduleOnce(() => {
FishManager.instance.killFish(this)
}, 1.5)
tween(this.node)
.repeatForever(tween().by(0.6, { angle: -360 }))
.start()
}
onDisable() {
//this.node.stopAllActions();
Tween.stopAllByTarget(this.node)
this.unscheduleAllCallbacks()
}
public fishInfo: FishInfo
public fishType: number = 1
public fishId: string = ''
public fishPathInfo: FishPathInfo
public isDead: number = 2
onLoad() {}
start() {}
// 播放死亡动画
public playDeadMv(res: any) {
this.isDead = 1
this.scheduleOnce(() => {
FishManager.instance.killFish(res)
}, 1)
tween(this.node)
.repeatForever(tween().by(0.6, { angle: -360 }))
.start()
}
onDisable() {
Tween.stopAllByTarget(this.node)
this.unscheduleAllCallbacks()
}
}

View File

@@ -1,85 +1,76 @@
import {
_decorator,
Component,
Vec2,
Node,
Vec3,
error,
Collider2D,
Contact2DType,
IPhysics2DContact,
} from 'cc'
const { ccclass, property } = _decorator
import { Collider2D, Component, Contact2DType, IPhysics2DContact, Vec2, Vec3, _decorator } from 'cc'
import BulletManager from '../../script/game/manager/BulletManager'
import FishNetManager from '../../script/game/manager/FishNetManager'
import FishBase from './FishBase'
import FishNetManager from '../../script/game/manager/FishNetManager'
import BulletManager from '../../script/game/manager/BulletManager'
import WsManager from '../../script/game/manager/WsManager'
import CannonManager from '../../script/game/manager/CannonManager'
import FishUI from './FishUI'
import FishManager from '../../script/game/manager/FishManager'
const { ccclass, property } = _decorator
@ccclass('FishBulletBase')
export default class FishBulletBase extends Component {
public bulletType: number = 0
public targetP: Vec2
public _cacheVec2: Vec2 = new Vec2()
public _cacheVec3: Vec3 = new Vec3()
private _collider: Collider2D
onLoad() {
this._collider = this.getComponent(Collider2D)
this._collider.sensor = true
//this._collider.on(Contact2DType.PRE_SOLVE, this.onBeginContact, this);
// PhysicsSystem2D.instance.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
}
start() {}
public bulletType: number = 0
onEnable() {
this._collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this)
//this._collider.on(Contact2DType.END_CONTACT, this.onBeginContact, this);
}
public targetP: Vec2
onDisable() {
this._collider.off(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this)
//this._collider.off(Contact2DType.END_CONTACT, this.onBeginContact, this);
}
public _cacheVec2: Vec2 = new Vec2()
onBeginContact(
selfCollider: Collider2D,
other: Collider2D,
contact: IPhysics2DContact | null
) {
// 只在两个碰撞体开始接触时被调用一次
if (other) {
let fish: FishBase = other.getComponent(FishBase)
if (fish && !fish.isDead) {
this.node.getPosition(this._cacheVec3)
this._cacheVec2.x = this._cacheVec3.x
this._cacheVec2.y = this._cacheVec3.y
FishNetManager.instance.addFishNet(this.bulletType, this._cacheVec2)
BulletManager.instance.killBullet(this)
fish.blood -= this.bulletType + 1
// fish.blood -= 100
if (fish.blood <= 0) {
fish.playDeadMv()
}
}
}
}
public _cacheVec3: Vec3 = new Vec3()
//v2.4代码
onCollisionEnter(other: Node, self: Node) {
error('onCollisionEnter=FishBulletBase=', other, self)
if (other) {
let fish: FishBase = other.getComponent(FishBase)
if (fish && !fish.isDead) {
this.node.getPosition(this._cacheVec3)
this._cacheVec2.x = this._cacheVec3.x
this._cacheVec2.y = this._cacheVec3.y
FishNetManager.instance.addFishNet(this.bulletType, this._cacheVec2)
BulletManager.instance.killBullet(this)
fish.blood -= this.bulletType + 1
// fish.blood -= 100
if (fish.blood <= 0) {
fish.playDeadMv()
}
}
}
}
private _collider: Collider2D | null = null
private currFish: FishBase | null = null
onLoad() {
WsManager.instance.on(5, this.handelMsg, this)
this._collider = this.getComponent(Collider2D)
if (this._collider) {
this._collider.sensor = true
this._collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this)
}
}
start() {}
onEnable() {
if (this._collider) this._collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this)
}
onDisable() {
if (this._collider) this._collider.off(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this)
}
// 处理碰撞
private handleFishCollision(fish: FishBase | null, contact: IPhysics2DContact | null) {
if (fish && fish.isDead === 2) {
this.node.getPosition(this._cacheVec3)
this._cacheVec2.x = this._cacheVec3.x
this._cacheVec2.y = this._cacheVec3.y
FishNetManager.instance.addFishNet(this.bulletType, this._cacheVec2)
BulletManager.instance.killBullet(this)
}
}
// 碰撞检测
onBeginContact(selfCollider: Collider2D, other: Collider2D, contact: IPhysics2DContact | null) {
const fish: FishBase | null = other.getComponent(FishBase)
WsManager.instance.onSend({
fish_id: fish.fishId,
cannon_id: CannonManager.instance.cannonType,
})
this.handleFishCollision(fish, contact)
}
handelMsg(res: any) {
FishUI.instance.refreshScore(res)
if (res.fish_status === 1) {
FishManager.instance.killFish(res)
}
}
protected onDestroy(): void {}
}

View File

@@ -1,164 +1,134 @@
import {
_decorator,
Component,
CCInteger,
CCFloat,
Vec2,
Animation,
Vec3,
} from 'cc'
import { Animation, CCFloat, CCInteger, Component, Vec2, Vec3, _decorator, log } from 'cc'
const {ccclass, property} = _decorator
import { Logger } from '../../script/engine/utils/Logger'
import MathUtils from '../../script/engine/utils/MathUtils'
import TimeHelper from '../../script/game/utils/TimeHelper'
import FishBase from './FishBase'
import MathUtils from '../../script/engine/utils/MathUtils'
import {Logger} from '../../script/engine/utils/Logger'
import TimeHelper from '../../script/game/utils/TimeHelper'
const { ccclass, property } = _decorator
@ccclass('FishMover')
export default class FishMover extends Component {
//鱼类型
@property({type: CCInteger})
public fishType: number = 1
//鱼移动速度
@property({type: CCFloat})
public speed: number = 3
//下个位置移动点
private targetMoveIndex: number = 0
//鱼移动位置
public movePList: Array<Vec2> = []
//贝萨尔曲线
public bezierPList: Array<Vec2> = []
public isMoving: boolean = false
private minSpeed: number = 0.1
private moveCount: number = 1
private totalTimes: number = 60 * 2
private _vec3Cahce: Vec3 = new Vec3()
// 鱼类型
@property({ type: CCInteger })
public fishType: number = 1
public startMove() {
this.targetMoveIndex = 0
this.isMoving = true
//this.node.getComponent(Animation).play()//v3 当前帧 不能播放
TimeHelper.exeNextFrame(this.node, () =>
this.node.getComponent(Animation).play()
)
// 鱼移动速度
@property({ type: CCFloat })
public speed: number = 3
// 下个位置移动点
private targetMoveIndex: number = 0
// 鱼移动位置
public movePList: Array<Vec2> = []
// 贝萨尔曲线
public bezierPList: Array<Vec2> = []
public isMoving: boolean = false
private minSpeed: number = 0.1
private moveCount: number = 1
private totalTimes: number = 60 * 2
private _vec3Cahce: Vec3 = new Vec3()
public startMove() {
this.targetMoveIndex = 0
this.isMoving = true
// this.node.getComponent(Animation).play()//v3 当前帧 不能播放
TimeHelper.exeNextFrame(this.node, () => this.node.getComponent(Animation).play())
}
update(dt) {
// this.moveFish();
this.checkMoveBezier()
}
// 检测是否到达目标点
private checkMoveBezier() {
if (this.isMoving && this.getComponent(FishBase).isDead === 2) {
this.moveCount++
if (this.moveCount >= this.totalTimes) this.moveCount = this.totalTimes
this.moveBezier()
}
}
update(dt) {
// this.moveFish();
this.checkMoveBezier()
}
private checkMoveBezier() {
if (this.isMoving && !this.getComponent(FishBase).isDead) {
this.moveCount++
if (this.moveCount >= this.totalTimes) {
this.moveCount = this.totalTimes
}
this.moveBezier()
// 贝塞尔曲线移动
public moveBezier() {
if (this.bezierPList.length > this.targetMoveIndex + 2) {
const p0: Vec2 = this.bezierPList[this.targetMoveIndex]
const p1: Vec2 = this.bezierPList[this.targetMoveIndex + 1]
const p2: Vec2 = this.bezierPList[this.targetMoveIndex + 2]
const t: number = this.moveCount / this.totalTimes
const mx: number = (1 - t) ** 2 * p0.x + 2 * t * (1 - t) * p1.x + t ** 2 * p2.x
const my: number = (1 - t) ** 2 * p0.y + 2 * t * (1 - t) * p1.y + t ** 2 * p2.y
this.node.getPosition(this._vec3Cahce)
const rad: number = MathUtils.p2pRad(
new Vec2(this._vec3Cahce.x, this._vec3Cahce.y),
new Vec2(mx, my),
)
const rot111: number = MathUtils.radiansToDegrees(rad)
const rot: number = MathUtils.rotation2Fish(rot111)
if (this.fishType === 7 || this.fishType === 27 || this.fishType === 29) {
if (rot > 90 || rot < -90) {
this.node.getScale(this._vec3Cahce)
if (this._vec3Cahce.x > 0) {
this._vec3Cahce.x = -1 * this._vec3Cahce.x
this.node.setScale(this._vec3Cahce)
}
}
}
public moveBezier() {
// [warn] [[-632,-230],[-444,-117],[-264,-242]]
// let p0: cc.Vec2 = cc.v2(-632, -230)
// let p1: cc.Vec2 = cc.v2(-444, -117)
// let p2: cc.Vec2 = cc.v2(-264, -242)
if (this.bezierPList.length > this.targetMoveIndex + 2) {
let p0: Vec2 = this.bezierPList[this.targetMoveIndex]
let p1: Vec2 = this.bezierPList[this.targetMoveIndex + 1]
let p2: Vec2 = this.bezierPList[this.targetMoveIndex + 2]
let t: number = this.moveCount / this.totalTimes
let mx: number =
Math.pow(1 - t, 2) * p0.x +
2 * t * (1 - t) * p1.x +
Math.pow(t, 2) * p2.x
let my: number =
Math.pow(1 - t, 2) * p0.y +
2 * t * (1 - t) * p1.y +
Math.pow(t, 2) * p2.y
this.node.getPosition(this._vec3Cahce)
let rad: number = MathUtils.p2pRad(
new Vec2(this._vec3Cahce.x, this._vec3Cahce.y),
new Vec2(mx, my)
)
let rot111: number = MathUtils.radiansToDegrees(rad)
let rot: number = MathUtils.rotation2Fish(rot111)
if (this.fishType == 7 || this.fishType == 27 || this.fishType == 29) {
if (rot > 90 || rot < -90) {
this.node.getScale(this._vec3Cahce)
if (this._vec3Cahce.x > 0) {
this._vec3Cahce.x = -1 * this._vec3Cahce.x
this.node.setScale(this._vec3Cahce)
}
} else {
this.node.getScale(this._vec3Cahce)
if (this._vec3Cahce.x < 0) {
this._vec3Cahce.x = -1 * this._vec3Cahce.x
this.node.setScale(this._vec3Cahce)
}
}
} else if (
this.fishType == 9 ||
this.fishType == 10 ||
this.fishType == 21 ||
this.fishType == 28
) {
} else {
// this.node.rotation = rot; //过时
this.node.angle = -rot
}
// Logger.log("moveBezier====", rad, rot111, this.fishType, rot)
let moveTimes: number = Math.round(this.speed / this.minSpeed)
for (let i = 0; i < moveTimes; i++) {
let speedX: number = this.minSpeed * Math.cos(rad)
let speedY: number = this.minSpeed * Math.sin(rad)
this.node.getPosition(this._vec3Cahce)
this._vec3Cahce.x += speedX
this._vec3Cahce.y += speedY
this.node.setPosition(this._vec3Cahce)
if (
MathUtils.distance(this._vec3Cahce.x, this._vec3Cahce.y, mx, my) <=
this.minSpeed
) {
this.node.setPosition(mx, my)
break
}
if (
MathUtils.distance(
this._vec3Cahce.x,
this._vec3Cahce.y,
p2.x,
p2.y
) <=
this.minSpeed * 2
) {
this.node.setPosition(p2.x, p2.y)
this.targetMoveIndex += 2
this.moveCount = 0
break
}
}
} else {
this.isMoving = false
} else if (
this.fishType === 9 ||
this.fishType === 10 ||
this.fishType === 21 ||
this.fishType === 28
) {
} else {
this.node.angle = -rot
}
// Logger.log("moveBezier====", rad, rot111, this.fishType, rot)
const moveTimes: number = Math.round(this.speed / this.minSpeed)
for (let i = 0; i < moveTimes; i++) {
const speedX: number = this.minSpeed * Math.cos(rad)
const speedY: number = this.minSpeed * Math.sin(rad)
this.node.getPosition(this._vec3Cahce)
this._vec3Cahce.x += speedX
this._vec3Cahce.y += speedY
this.node.setPosition(this._vec3Cahce)
if (MathUtils.distance(this._vec3Cahce.x, this._vec3Cahce.y, mx, my) <= this.minSpeed) {
this.node.setPosition(mx, my)
break
}
}
onDisable() {
this.isMoving = false
}
public exportBezierConfig() {
Logger.warn('exportBezierConfig=')
let tempConfig: Array<Array<number>> = []
for (let i = 0; i < this.bezierPList.length; i++) {
tempConfig[i] = []
tempConfig[i].push(Math.floor(this.bezierPList[i].x))
tempConfig[i].push(Math.floor(this.bezierPList[i].y))
if (
MathUtils.distance(this._vec3Cahce.x, this._vec3Cahce.y, p2.x, p2.y) <=
this.minSpeed * 2
) {
this.node.setPosition(p2.x, p2.y)
this.targetMoveIndex += 2
this.moveCount = 0
break
}
Logger.warn('fishtype', this.fishType)
Logger.warn('speed', this.speed)
Logger.warn('scale', this.node.scale)
Logger.warn(JSON.stringify(tempConfig))
}
} else {
Logger.log('moveBezier====', 'end')
this.isMoving = false
}
}
onDisable() {
this.isMoving = false
}
// 导出贝塞尔曲线配置
public exportBezierConfig() {
Logger.warn('exportBezierConfig=')
const tempConfig: Array<Array<number>> = []
for (let i = 0; i < this.bezierPList.length; i++) {
tempConfig[i] = []
tempConfig[i].push(Math.floor(this.bezierPList[i].x))
tempConfig[i].push(Math.floor(this.bezierPList[i].y))
}
Logger.warn('fishtype', this.fishType)
Logger.warn('speed', this.speed)
Logger.warn('scale', this.node.scale)
Logger.warn(JSON.stringify(tempConfig))
}
}

View File

@@ -1,27 +1,29 @@
import { _decorator, Component, Tween, tween, Vec3, Vec2 } from 'cc'
const { ccclass, property } = _decorator
import { Component, Tween, Vec3, _decorator, tween } from 'cc'
import FishNetManager from '../../script/game/manager/FishNetManager'
const { ccclass, property } = _decorator
@ccclass('FishNetBase')
export default class FishNetBase extends Component {
public netType: number = 0
public netType: number = 0
private tween: Tween<any>
private static vec3: Vec3 = new Vec3(2, 2, 1)
public playMv() {
this.node.setScale(Vec3.ZERO)
this.tween = tween(this.node)
.to(0.2, { scale: FishNetBase.vec3 })
.delay(0.3)
.call(() => {
FishNetManager.instance.destroyFishNet(this)
})
.start()
}
onDestroy() {
if (this.tween) {
this.tween.stop()
}
}
private tween: Tween<any>
private static vec3: Vec3 = new Vec3(2, 2, 1)
// 销毁渔网
public playMv() {
this.node.setScale(Vec3.ZERO)
this.tween = tween(this.node)
.to(0.2, { scale: FishNetBase.vec3 })
.delay(0.3)
.call(() => {
FishNetManager.instance.destroyFishNet(this)
})
.start()
}
onDestroy() {
if (this.tween) this.tween.stop()
}
}

View File

@@ -1,67 +1,55 @@
import { _decorator, Slider, Node, Canvas, instantiate, director } from 'cc'
const { ccclass, property } = _decorator
import { Node, Slider, _decorator, instantiate } from 'cc'
import EventManager from '../../script/engine/utils/EventManager'
import DialogBase from '../../script/engine/uicomponent/DialogBase'
import MusicPrefab from '../../script/engine/uicomponent/MusicPrefab'
import SoundPrefab from '../../script/engine/uicomponent/SoundPrefab'
import EventManager from '../../script/engine/utils/EventManager'
import PrefabLoader from '../../script/engine/utils/PrefabLoader'
import { GameConfig } from '../../script/game/config/GameConfig'
const { ccclass, property } = _decorator
@ccclass('FishSetting')
export default class FishSetting extends DialogBase {
@property({ type: Slider })
private musicSlider: Slider | null = null
@property({ type: Slider })
private soundSlider: Slider | null = null
@property({ type: Slider })
private musicSlider: Slider | null = null
onLoadMe() {
EventManager.instance.addSliderEvent(
this.node,
this.musicSlider.node,
'onMusicSlider',
0
)
EventManager.instance.addSliderEvent(
this.node,
this.soundSlider.node,
'onSoundSlider',
0
)
this.refresh()
}
@property({ type: Slider })
private soundSlider: Slider | null = null
private onMusicSlider(slider: Slider, customEventData) {
let percent: number = Number(slider.progress.toFixed(3))
// let maxMoney: number = Math.max(UserInfoModel.userScore - 10, 0)
// this.nowExchangeNum = Math.floor(maxMoney * this.nowPercent);
// this.refresh();
MusicPrefab.changeVolumn(percent)
this.refresh()
}
onLoadMe() {
EventManager.instance.addSliderEvent(this.node, this.musicSlider.node, 'onMusicSlider', 0)
EventManager.instance.addSliderEvent(this.node, this.soundSlider.node, 'onSoundSlider', 0)
this.refresh()
}
private onSoundSlider(slider: Slider, customEventData) {
let percent: number = Number(slider.progress.toFixed(3))
SoundPrefab.changeVolumn(percent)
this.refresh()
}
// 音乐
private onMusicSlider(slider: Slider, customEventData) {
const percent: number = Number(slider.progress.toFixed(3))
MusicPrefab.changeVolumn(percent)
this.refresh()
}
private refresh() {
this.musicSlider.progress = MusicPrefab.musicVolumn
this.soundSlider.progress = SoundPrefab.soundVolumn
}
// 声音
private onSoundSlider(slider: Slider, customEventData) {
const percent: number = Number(slider.progress.toFixed(3))
SoundPrefab.changeVolumn(percent)
this.refresh()
}
public static show(parentNode: Node = null) {
PrefabLoader.loadPrefab(
GameConfig.GameName + '/' + 'game/dialog/FishSetting',
(loadedResource) => {
if (!parentNode) {
parentNode = DialogBase.GetRootCanvas()
}
let node: Node = instantiate(loadedResource)
parentNode.addChild(node)
node.setPosition(0, 0)
}
)
}
// 刷新音乐和声音
private refresh() {
this.musicSlider.progress = MusicPrefab.musicVolumn
this.soundSlider.progress = SoundPrefab.soundVolumn
}
public static show(parentNode: Node = null) {
PrefabLoader.loadPrefab(`${GameConfig.GameName}/game/dialog/FishSetting`, (loadedResource) => {
if (!parentNode) parentNode = DialogBase.GetRootCanvas()
const node: Node = instantiate(loadedResource)
parentNode.addChild(node)
node.setPosition(0, 0)
})
}
}

View File

@@ -1,106 +1,109 @@
import {
_decorator,
Component,
Label,
Animation,
Node,
Vec2,
Tween,
tween,
Vec3,
} from 'cc'
const { ccclass, property } = _decorator
import { Animation, Component, Label, Node, Tween, Vec2, Vec3, _decorator, find, tween } from 'cc'
import CannonManager from '../../script/game/manager/CannonManager'
import FishManager from '../../script/game/manager/FishManager'
import FishSetting from './FishSetting'
import FishManager from '../../script/game/manager/FishManager'
import CannonManager from '../../script/game/manager/CannonManager'
import WsManager from '../../script/game/manager/WsManager'
const { ccclass, property } = _decorator
@ccclass('FishUI')
export default class FishUI extends Component {
public static instance: FishUI = null
@property({ type: Label })
private dzScore: Label | null = null
@property({ type: Label })
private jfScore: Label | null = null
@property({ type: Animation })
private clickEffect: Animation | null = null
@property({ type: Node })
private waveEffect: Node | null = null
// 豆子
public dz_score: number = 100
// 积分
public jf_score: number = 0
private _vec3Cache: Vec3
onLoad() {
FishUI.instance = this
this._vec3Cache = new Vec3()
this.clickEffect.node.active = false
this.waveEffect.active = false
this.dzScore = this.node
.getChildByName('dzScore')
.getComponent(Label) as Label
this.jfScore = this.node
.getChildByName('jfScore')
.getComponent(Label) as Label
}
public static instance: FishUI = null
@property({ type: Label })
private dzScore: Label | null = null
start() {
this.refreshScore()
// setTimeout(()=>{
// this.playWaveEffect();
// }, 5000)
}
@property({ type: Label })
private jfScore: Label | null = null
public playClickEffect(p: Vec2) {
this._vec3Cache.x = p.x
this._vec3Cache.y = p.y
this._vec3Cache.z = 0
this.clickEffect.node.setPosition(this._vec3Cache)
this.clickEffect.node.active = true
this.clickEffect.play()
}
@property({ type: Animation })
private clickEffect: Animation | null = null
public playWaveEffect() {
this.waveEffect.active = true
this.waveEffect.setPosition(1292.703, 0)
@property({ type: Node })
private waveEffect: Node | null = null
FishManager.instance.playFishMap()
tween(this.waveEffect)
.to(2, { position: new Vec3(-1319.969, 0, 0) })
.call(() => {
this.waveEffect.active = false
FishManager.instance.startFishMap()
})
.start()
}
// 豆子
public dz_score: number = 0
// 积分
public jf_score: number = 0
private _vec3Cache: Vec3
private onClickPre() {
if (CannonManager.instance.cannonType > 1) {
CannonManager.instance.cannonType--
CannonManager.instance.refreshCannon()
}
}
onLoad() {
FishUI.instance = this
this._vec3Cache = new Vec3()
this.clickEffect.node.active = false
this.waveEffect.active = false
this.dzScore = this.node
.getChildByName('userInfo')
.getChildByName('info')
.getChildByName('dz_fillet')
.getChildByName('dz_text')
.getComponent(Label) as Label
this.jfScore = this.node
.getChildByName('userInfo')
.getChildByName('info')
.getChildByName('jf_fillet')
.getChildByName('jf_text')
.getComponent(Label) as Label
}
private onClickNext() {
if (CannonManager.instance.cannonType < 7) {
CannonManager.instance.cannonType++
CannonManager.instance.refreshCannon()
}
}
start() {
// this.refreshScore()
}
public refreshScore() {
this.dzScore.string = this.dz_score + ''
this.jfScore.string = this.jf_score + ''
}
public playClickEffect(p: Vec2) {
this._vec3Cache.x = p.x
this._vec3Cache.y = p.y
this._vec3Cache.z = 0
this.clickEffect.node.setPosition(this._vec3Cache)
this.clickEffect.node.active = true
this.clickEffect.play()
}
private onClickSetting() {
FishSetting.show()
}
public playWaveEffect() {
this.waveEffect.active = true
this.waveEffect.setPosition(1292.703, 0)
onDestroy() {
FishUI.instance = null
this.unscheduleAllCallbacks()
Tween.stopAllByTarget(this.node)
//this.node.stopAllActions();
}
FishManager.instance.playFishMap()
tween(this.waveEffect)
.to(2, { position: new Vec3(-1319.969, 0, 0) })
.call(() => {
this.waveEffect.active = false
FishManager.instance.startFishMap()
})
.start()
}
private onClickPre() {
if (CannonManager.instance.cannonType > 1) {
CannonManager.instance.cannonType--
CannonManager.instance.refreshCannon()
}
}
private onClickNext() {
if (CannonManager.instance.cannonType < 7) {
CannonManager.instance.cannonType++
CannonManager.instance.refreshCannon()
}
}
public refreshScore(res: any) {
this.dz_score = res.pulse
this.jf_score = res.integral
this.dzScore.string = `${this.dz_score}`
this.jfScore.string = `${this.jf_score}`
}
private onClickSetting() {
FishSetting.show()
}
onDestroy() {
FishUI.instance = null
this.unscheduleAllCallbacks()
Tween.stopAllByTarget(this.node)
// this.node.stopAllActions();
}
}

View File

@@ -1,13 +1,4 @@
import {
_decorator,
ScrollView,
Prefab,
Node,
instantiate,
Label,
Vec3,
Animation,
} from 'cc'
import { _decorator, ScrollView, Prefab, Node, instantiate, Label, Vec3, Animation } from 'cc'
const { ccclass, property } = _decorator
import FishBase from './FishBase'
@@ -21,70 +12,62 @@ import TimeHelper from '../../script/game/utils/TimeHelper'
@ccclass('FishWiki')
export default class FishWiki extends DialogBase {
@property({ type: ScrollView })
private scrollView: ScrollView | null = null
@property({ type: Prefab })
private wikiItemPrefab: Prefab | null = null
@property({ type: ScrollView })
private scrollView: ScrollView | null = null
@property({ type: Prefab })
private wikiItemPrefab: Prefab | null = null
private _vec3Cache: Vec3
onLoadMe() {
this._vec3Cache = new Vec3(1, 1, 1)
this.init()
}
private _vec3Cache: Vec3
onLoadMe() {
this._vec3Cache = new Vec3(1, 1, 1)
this.init()
}
private init() {
this.scrollView.content.removeAllChildren()
this.initOne(0)
}
private init() {
this.scrollView.content.removeAllChildren()
this.initOne(0)
}
private initOne(index: number) {
if (index < FishConfig.config.length) {
let itemNode: Node = instantiate(this.wikiItemPrefab)
private initOne(index: number) {
if (index < FishConfig.config.length) {
let itemNode: Node = instantiate(this.wikiItemPrefab)
this.scrollView.content.addChild(itemNode)
let fishInfo: FishInfo = FishConfig.config[index]
let txtName: Label = itemNode
.getChildByName('txtName')
.getComponent(Label)
txtName.string = fishInfo.name
let txtLife: Label = itemNode
.getChildByName('txtLife')
.getComponent(Label)
txtLife.string = 'life:' + fishInfo.blood + ''
let view: Node = itemNode.getChildByName('view')
view.removeAllChildren()
this.scrollView.content.addChild(itemNode)
let fishInfo: FishInfo = FishConfig.config[index]
let txtName: Label = itemNode.getChildByName('txtName').getComponent(Label)
txtName.string = fishInfo.name
let txtLife: Label = itemNode.getChildByName('txtLife').getComponent(Label)
txtLife.string = '积分:' + fishInfo.blood + ''
let view: Node = itemNode.getChildByName('view')
view.removeAllChildren()
let fish: FishBase = FishManager.instance.createFishByType(
fishInfo.fishType
)
view.addChild(fish.node)
fish.node.setPosition(0, 0)
let fish: FishBase = FishManager.instance.createFishByType(fishInfo.fishType)
view.addChild(fish.node)
fish.node.setPosition(0, 0)
//缩放有bug
//Vec3.multiplyScalar(this._vec3Cache, this._vec3Cache, fishInfo.wikiScale);
//fish.node.setScale(this._vec3Cache);
//缩放有bug
//Vec3.multiplyScalar(this._vec3Cache, this._vec3Cache, fishInfo.wikiScale);
//fish.node.setScale(this._vec3Cache);
//fish.node.getComponent(Animation).play(); //v3 当前帧 不能播放
TimeHelper.exeNextFrame(this.node, () =>
fish.node.getComponent(Animation).play()
)
this.scheduleOnce(() => {
this.initOne(index + 1)
}, 0.05)
}
}
//fish.node.getComponent(Animation).play(); //v3 当前帧 不能播放
TimeHelper.exeNextFrame(this.node, () => fish.node.getComponent(Animation).play())
this.scheduleOnce(() => {
this.initOne(index + 1)
}, 0.05)
}
}
public static show(parentNode: Node = null) {
PrefabLoader.loadPrefab(
GameConfig.GameName + '/' + 'game/dialog/FishWiki',
(loadedResource) => {
if (!parentNode) {
parentNode = DialogBase.GetRootCanvas()
}
let node: Node = instantiate(loadedResource)
parentNode.addChild(node)
node.setPosition(0, 0)
}
)
}
public static show(parentNode: Node = null) {
PrefabLoader.loadPrefab(
GameConfig.GameName + '/' + 'game/dialog/FishWiki',
(loadedResource) => {
if (!parentNode) {
parentNode = DialogBase.GetRootCanvas()
}
let node: Node = instantiate(loadedResource)
parentNode.addChild(node)
node.setPosition(0, 0)
},
)
}
}

BIN
assets/FishSingle/pictures/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.26",
"importer": "image",
"imported": true,
"uuid": "cda62680-32c9-4bf8-bdf5-341b6d6f41c3",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "cda62680-32c9-4bf8-bdf5-341b6d6f41c3@6c48a",
"displayName": "avatar",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "cda62680-32c9-4bf8-bdf5-341b6d6f41c3",
"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": "cda62680-32c9-4bf8-bdf5-341b6d6f41c3@f9941",
"displayName": "avatar",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 74,
"height": 77,
"rawWidth": 74,
"rawHeight": 77,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-37,
-38.5,
0,
37,
-38.5,
0,
-37,
38.5,
0,
37,
38.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
77,
74,
77,
0,
0,
74,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-37,
-38.5,
0
],
"maxPos": [
37,
38.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "cda62680-32c9-4bf8-bdf5-341b6d6f41c3@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "cda62680-32c9-4bf8-bdf5-341b6d6f41c3@f9941"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.26",
"importer": "image",
"imported": true,
"uuid": "962c910f-069b-4a38-9099-4596ed34e91e",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "962c910f-069b-4a38-9099-4596ed34e91e@6c48a",
"displayName": "dz",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "962c910f-069b-4a38-9099-4596ed34e91e",
"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": "962c910f-069b-4a38-9099-4596ed34e91e@f9941",
"displayName": "dz",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 45,
"height": 42,
"rawWidth": 45,
"rawHeight": 42,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-22.5,
-21,
0,
22.5,
-21,
0,
-22.5,
21,
0,
22.5,
21,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
42,
45,
42,
0,
0,
45,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-22.5,
-21,
0
],
"maxPos": [
22.5,
21,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "962c910f-069b-4a38-9099-4596ed34e91e@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": true,
"redirect": "962c910f-069b-4a38-9099-4596ed34e91e@f9941"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,137 @@
{
"ver": "1.0.26",
"importer": "image",
"imported": true,
"uuid": "38ef2cdf-a945-429d-b703-3c9536058498",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "38ef2cdf-a945-429d-b703-3c9536058498@6c48a",
"displayName": "fillet",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "38ef2cdf-a945-429d-b703-3c9536058498",
"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": "38ef2cdf-a945-429d-b703-3c9536058498@f9941",
"displayName": "fillet",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0.5,
"offsetY": 0,
"trimX": 1,
"trimY": 0,
"width": 166,
"height": 36,
"rawWidth": 167,
"rawHeight": 36,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 15,
"borderRight": 15,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-83,
-18,
0,
83,
-18,
0,
-83,
18,
0,
83,
18,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
1,
36,
167,
36,
1,
0,
167,
0
],
"nuv": [
0.005988023952095809,
0,
1,
0,
0.005988023952095809,
1,
1,
1
],
"minPos": [
-83,
-18,
0
],
"maxPos": [
83,
18,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "38ef2cdf-a945-429d-b703-3c9536058498@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "38ef2cdf-a945-429d-b703-3c9536058498@f9941",
"compressSettings": {
"useCompressTexture": false
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 287 KiB

View File

@@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1920,
"height": 1080,
"rawWidth": 1920,
"rawHeight": 1080,
"width": 1334,
"height": 750,
"rawWidth": 1334,
"rawHeight": 750,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@@ -64,17 +64,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-960,
-540,
-667,
-375,
0,
960,
-540,
667,
-375,
0,
-960,
540,
-667,
375,
0,
960,
540,
667,
375,
0
],
"indexes": [
@@ -87,12 +87,12 @@
],
"uv": [
0,
1080,
1920,
1080,
750,
1334,
750,
0,
0,
1920,
1334,
0
],
"nuv": [
@@ -106,13 +106,13 @@
1
],
"minPos": [
-960,
-540,
-667,
-375,
0
],
"maxPos": [
960,
540,
667,
375,
0
]
}

BIN
assets/FishSingle/pictures/haobuyu/fishbg1.jpg Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 121 KiB

View File

@@ -2,7 +2,7 @@
"ver": "1.0.26",
"importer": "image",
"imported": true,
"uuid": "66d28bb4-7926-457a-bfdd-352fbdff0612",
"uuid": "30514d45-db3b-4904-9e84-5269572856f6",
"files": [
".jpg",
".json"
@@ -10,20 +10,20 @@
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "66d28bb4-7926-457a-bfdd-352fbdff0612@6c48a",
"uuid": "30514d45-db3b-4904-9e84-5269572856f6@6c48a",
"displayName": "fishbg1",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "30514d45-db3b-4904-9e84-5269572856f6",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"wrapModeT": "clamp-to-edge",
"wrapModeS": "clamp-to-edge",
"mipfilter": "none",
"imageUuidOrDatabaseUri": "66d28bb4-7926-457a-bfdd-352fbdff0612",
"anisotropy": 0,
"isUuid": true,
"visible": false
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
@@ -34,7 +34,7 @@
},
"f9941": {
"importer": "sprite-frame",
"uuid": "66d28bb4-7926-457a-bfdd-352fbdff0612@f9941",
"uuid": "30514d45-db3b-4904-9e84-5269572856f6@f9941",
"displayName": "fishbg1",
"id": "f9941",
"name": "spriteFrame",
@@ -46,35 +46,32 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 941,
"height": 529,
"rawWidth": 941,
"rawHeight": 529,
"width": 1280,
"height": 720,
"rawWidth": 1280,
"rawHeight": 720,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"imageUuidOrDatabaseUri": "66d28bb4-7926-457a-bfdd-352fbdff0612@6c48a",
"packable": true,
"isUuid": true,
"atlasUuid": "",
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-470.5,
-264.5,
-640,
-360,
0,
470.5,
-264.5,
640,
-360,
0,
-470.5,
264.5,
-640,
360,
0,
470.5,
264.5,
640,
360,
0
],
"indexes": [
@@ -87,12 +84,12 @@
],
"uv": [
0,
529,
941,
529,
720,
1280,
720,
0,
0,
941,
1280,
0
],
"nuv": [
@@ -106,16 +103,19 @@
1
],
"minPos": [
-470.5,
-264.5,
-640,
-360,
0
],
"maxPos": [
470.5,
264.5,
640,
360,
0
]
}
},
"isUuid": true,
"imageUuidOrDatabaseUri": "30514d45-db3b-4904-9e84-5269572856f6@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
@@ -128,7 +128,7 @@
"userData": {
"type": "sprite-frame",
"hasAlpha": false,
"redirect": "66d28bb4-7926-457a-bfdd-352fbdff0612@f9941",
"fixAlphaTransparencyArtifacts": false
"fixAlphaTransparencyArtifacts": false,
"redirect": "30514d45-db3b-4904-9e84-5269572856f6@f9941"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.26",
"importer": "image",
"imported": true,
"uuid": "667dae90-8327-4fd8-b314-c95c92ed1420",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "667dae90-8327-4fd8-b314-c95c92ed1420@6c48a",
"displayName": "jf",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "667dae90-8327-4fd8-b314-c95c92ed1420",
"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": "667dae90-8327-4fd8-b314-c95c92ed1420@f9941",
"displayName": "jf",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 36,
"height": 36,
"rawWidth": 36,
"rawHeight": 36,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-18,
-18,
0,
18,
-18,
0,
-18,
18,
0,
18,
18,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
36,
36,
36,
0,
0,
36,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-18,
-18,
0
],
"maxPos": [
18,
18,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "667dae90-8327-4fd8-b314-c95c92ed1420@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "667dae90-8327-4fd8-b314-c95c92ed1420@f9941"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.26",
"importer": "image",
"imported": true,
"uuid": "f9fc17ee-6006-40dd-8429-f46040b4d56c",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "f9fc17ee-6006-40dd-8429-f46040b4d56c@6c48a",
"displayName": "userbg",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "f9fc17ee-6006-40dd-8429-f46040b4d56c",
"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": "f9fc17ee-6006-40dd-8429-f46040b4d56c@f9941",
"displayName": "userbg",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1,
"trimY": 1,
"width": 262,
"height": 90,
"rawWidth": 264,
"rawHeight": 92,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-131,
-45,
0,
131,
-45,
0,
-131,
45,
0,
131,
45,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
1,
91,
263,
91,
1,
1,
263,
1
],
"nuv": [
0.003787878787878788,
0.010869565217391304,
0.9962121212121212,
0.010869565217391304,
0.003787878787878788,
0.9891304347826086,
0.9962121212121212,
0.9891304347826086
],
"minPos": [
-131,
-45,
0
],
"maxPos": [
131,
45,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "f9fc17ee-6006-40dd-8429-f46040b4d56c@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "f9fc17ee-6006-40dd-8429-f46040b4d56c@f9941"
}
}

View File

@@ -487,7 +487,6 @@
"_batchAsBitmap": false,
"_id": "",
"_enableOutline": true,
"_outlineWidth": 3,
"_outlineColor": {
"__type__": "cc.Color",
"r": 0,

View File

@@ -549,12 +549,11 @@
"_styleFlags": 0,
"_id": "",
"_enableOutline": true,
"_outlineWidth": 3,
"_outlineColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"r": 0,
"g": 0,
"b": 0,
"a": 255
}
},
@@ -736,12 +735,11 @@
"_styleFlags": 0,
"_id": "",
"_enableOutline": true,
"_outlineWidth": 3,
"_outlineColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"r": 0,
"g": 0,
"b": 0,
"a": 255
}
},

View File

@@ -173,16 +173,14 @@
"_batchAsBitmap": false,
"_id": "",
"_enableOutline": true,
"_outlineWidth": 2,
"_outlineColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_enableShadow": true,
"_shadowBlur": 2,
"_shadowOffset": {
"__type__": "cc.Vec2",
"x": 2,
@@ -190,9 +188,9 @@
},
"_shadowColor": {
"__type__": "cc.Color",
"r": 250,
"g": 250,
"b": 250,
"r": 0,
"g": 0,
"b": 0,
"a": 255
}
},

File diff suppressed because it is too large Load Diff

View File

@@ -23,7 +23,7 @@
"_active": true,
"_components": [],
"_prefab": {
"__id__": 44
"__id__": 52
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -54,7 +54,7 @@
},
"autoReleaseAssets": false,
"_globals": {
"__id__": 53
"__id__": 61
},
"_id": "3deca686-356b-4a89-97e0-d255f6a637b7"
},
@@ -77,25 +77,25 @@
"__id__": 12
},
{
"__id__": 35
"__id__": 43
}
],
"_active": true,
"_components": [
{
"__id__": 39
"__id__": 47
},
{
"__id__": 40
"__id__": 48
},
{
"__id__": 41
"__id__": 49
},
{
"__id__": 42
"__id__": 50
},
{
"__id__": 43
"__id__": 51
}
],
"_prefab": null,
@@ -193,7 +193,7 @@
"_priority": -1,
"_fov": 60,
"_fovAxis": 0,
"_orthoHeight": 803.9871382636657,
"_orthoHeight": 627.2953367875648,
"_near": 1,
"_far": 4096,
"_color": {
@@ -484,6 +484,24 @@
},
{
"__id__": 33
},
{
"__id__": 35
},
{
"__id__": 36
},
{
"__id__": 37
},
{
"__id__": 38
},
{
"__id__": 39
},
{
"__id__": 41
}
],
"removedComponents": []
@@ -674,6 +692,88 @@
"9686r/7GBC1Jgt/Xl5Wlbk"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 16
},
"propertyPath": [
"_active"
],
"value": true
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 16
},
"propertyPath": [
"_lpos"
],
"value": {
"__type__": "cc.Vec3",
"x": -22.359,
"y": -464.755,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 22
},
"propertyPath": [
"_active"
],
"value": false
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 22
},
"propertyPath": [
"_lpos"
],
"value": {
"__type__": "cc.Vec3",
"x": -646.5,
"y": -0.10000000149011612,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 40
},
"propertyPath": [
"_active"
],
"value": false
},
{
"__type__": "cc.TargetInfo",
"localID": [
"e2Vv1bUelC/7EpoI1XnDNy"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 42
},
"propertyPath": [
"_active"
],
"value": false
},
{
"__type__": "cc.TargetInfo",
"localID": [
"c244u/aPRAJrCOXsUYfICO"
]
},
{
"__type__": "cc.Node",
"_name": "UIRoot",
@@ -686,13 +786,13 @@
"_active": true,
"_components": [
{
"__id__": 36
"__id__": 44
},
{
"__id__": 37
"__id__": 45
},
{
"__id__": 38
"__id__": 46
}
],
"_prefab": null,
@@ -731,7 +831,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 35
"__id__": 43
},
"_enabled": true,
"__prefab": null,
@@ -753,7 +853,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 35
"__id__": 43
},
"_enabled": true,
"__prefab": null,
@@ -783,7 +883,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 35
"__id__": 43
},
"_enabled": true,
"__prefab": null,
@@ -893,13 +993,13 @@
"instance": null,
"targetOverrides": [
{
"__id__": 45
"__id__": 53
},
{
"__id__": 47
"__id__": 55
},
{
"__id__": 50
"__id__": 58
}
],
"nestedPrefabInstanceRoots": [
@@ -911,7 +1011,7 @@
{
"__type__": "cc.TargetOverrideInfo",
"source": {
"__id__": 40
"__id__": 48
},
"sourceInfo": null,
"propertyPath": [
@@ -921,7 +1021,7 @@
"__id__": 12
},
"targetInfo": {
"__id__": 46
"__id__": 54
}
},
{
@@ -936,7 +1036,7 @@
"__id__": 12
},
"sourceInfo": {
"__id__": 48
"__id__": 56
},
"propertyPath": [
"percentLable"
@@ -945,7 +1045,7 @@
"__id__": 12
},
"targetInfo": {
"__id__": 49
"__id__": 57
}
},
{
@@ -966,7 +1066,7 @@
"__id__": 12
},
"sourceInfo": {
"__id__": 51
"__id__": 59
},
"propertyPath": [
"bar"
@@ -975,7 +1075,7 @@
"__id__": 12
},
"targetInfo": {
"__id__": 52
"__id__": 60
}
},
{
@@ -993,28 +1093,28 @@
{
"__type__": "cc.SceneGlobals",
"ambient": {
"__id__": 54
"__id__": 62
},
"shadows": {
"__id__": 55
"__id__": 63
},
"_skybox": {
"__id__": 56
"__id__": 64
},
"fog": {
"__id__": 57
"__id__": 65
},
"octree": {
"__id__": 58
"__id__": 66
},
"skin": {
"__id__": 59
"__id__": 67
},
"lightProbeInfo": {
"__id__": 60
"__id__": 68
},
"postSettings": {
"__id__": 61
"__id__": 69
},
"bakedWithStationaryMainLight": false,
"bakedWithHighpLightmap": false

View File

@@ -4,9 +4,9 @@ const { ccclass, property } = _decorator
@ccclass('CommonEvent')
export default class CommonEvent {
public static Event_FrameUpdate: string = 'Event_FrameUpdate'
public static Event_ConnectTimeOut: string = 'Event_ConnectTimeOut'
public static Event_ResourceLoader: string = 'Event_ResourceLoader'
public static Event_CheckUpdate: string = 'Event_CheckUpdate'
public static Event_Scene_Switch: string = 'Event_Scene_Switch'
public static Event_FrameUpdate: string = 'Event_FrameUpdate'
public static Event_ConnectTimeOut: string = 'Event_ConnectTimeOut'
public static Event_ResourceLoader: string = 'Event_ResourceLoader'
public static Event_CheckUpdate: string = 'Event_CheckUpdate'
public static Event_Scene_Switch: string = 'Event_Scene_Switch'
}

View File

@@ -1,37 +1,36 @@
import DateUtil from '../utils/DateUtil'
import NetConfig from './NetConfig'
export default class ManifestConfig {
public static packageUrl: string = ''
public static remoteManifestUrl: string = ''
public static remoteVersionUrl: string = ''
public static version: string = '1.0.0' //更新包要更新这里
public static assets: object = {}
public static searchPaths: Array<any> = []
public static getManifestStr(key: string) {
let obj: Object = {}
obj['packageUrl'] = `${NetConfig.hotupdateUrl}/hotupdate/${key}/`
obj['remoteManifestUrl'] =
NetConfig.hotupdateUrl +
'/hotupdate/' +
key +
'/project.manifest?t=' +
DateUtil.now()
obj['remoteManifestUrl'] = `${
NetConfig.hotupdateUrl
}/hotupdate/${key}/project.manifest?t=${DateUtil.now()}`
obj['remoteVersionUrl'] =
NetConfig.hotupdateUrl +
'/hotupdate/' +
key +
'/version.manifest?t=' +
DateUtil.now()
obj['remoteVersionUrl'] = `${
NetConfig.hotupdateUrl
}/hotupdate/${key}/version.manifest?t=${DateUtil.now()}`
obj['version'] = ManifestConfig.version
obj['assets'] = {}
obj['searchPaths'] = []
return JSON.stringify(obj)
}
public static packageUrl: string = ''
public static remoteManifestUrl: string = ''
public static remoteVersionUrl: string = ''
public static version: string = '1.0.0' // 更新包要更新这里
public static assets: object = {}
public static searchPaths: Array<any> = []
public static getManifestStr(key: string) {
const obj: {
packageUrl?: string
remoteManifestUrl?: string
remoteVersionUrl?: string
version?: string
assets?: object
searchPaths?: Array<any>
} = {}
obj.packageUrl = `${NetConfig.hotupdateUrl}/hotupdate/${key}/`
obj.remoteManifestUrl = `${NetConfig.hotupdateUrl}/hotupdate/${key}/project.manifest?t=${DateUtil.now()}`
obj.remoteManifestUrl = `${
NetConfig.hotupdateUrl
}/hotupdate/${key}/project.manifest?t=${DateUtil.now()}`
obj.remoteVersionUrl = `${NetConfig.hotupdateUrl}/hotupdate/${key}/version.manifest?t=${DateUtil.now()}`
obj.remoteVersionUrl = `${
NetConfig.hotupdateUrl
}/hotupdate/${key}/version.manifest?t=${DateUtil.now()}`
obj.version = ManifestConfig.version
obj.assets = {}
obj.searchPaths = []
return JSON.stringify(obj)
}
}

View File

@@ -1,64 +1,59 @@
import { AudioClip } from 'cc'
import { GameConfig } from '../../game/config/GameConfig'
export default class MusicConfig {
public static musicKey2Path: Map<string, string> = new Map<string, string>() //资源预加载路径
public static musicKey2Path: Map<string, string> = new Map<string, string>() // 资源预加载路径
public static musicKey2Cache: Map<string, AudioClip> = new Map<
string,
AudioClip
>() //资源加载后cache路径
public static musicKey2Cache: Map<string, AudioClip> = new Map<string, AudioClip>() // 资源加载后cache路径
public static init() {
if (
typeof GameConfig.GameName === 'undefined' ||
GameConfig.GameName === null
) {
console.error('GameConfig.GameName 未配置!')
return
}
public static init() {
if (typeof GameConfig.GameName === 'undefined' || GameConfig.GameName === null) {
console.error('GameConfig.GameName 未配置!')
return
}
const musicConfig = {
background_1: 'music/background_1',
background_2: 'music/background_2',
background_3: 'music/background_3',
deadfish_1: 'music/deadfish_1',
deadfish_2: 'music/deadfish_2',
deadfish_3: 'music/deadfish_3',
deadfish_4: 'music/deadfish_4',
deadfish_5: 'music/deadfish_5',
deadfish_6: 'music/deadfish_6',
deadfish_7: 'music/deadfish_7',
deadfish_8: 'music/deadfish_8',
deadfish_9: 'music/deadfish_9',
deadfish_10: 'music/deadfish_10',
deadfish_11: 'music/deadfish_11',
deadfish_12: 'music/deadfish_12',
deadfish_13: 'music/deadfish_13',
deadfish_14: 'music/deadfish_14',
deadfish_15: 'music/deadfish_15',
deadfish_16: 'music/deadfish_16',
deadfish_17: 'music/deadfish_17',
deadfish_18: 'music/deadfish_18',
deadfish_19: 'music/deadfish_19',
deadfish_20: 'music/deadfish_20',
deadfish_21: 'music/deadfish_21',
deadfish_22: 'music/deadfish_22',
deadfish_23: 'music/deadfish_23',
deadfish_24: 'music/deadfish_24',
deadfish_25: 'music/deadfish_25',
deadfish_26: 'music/deadfish_26',
deadfish_27: 'music/deadfish_27',
deadfish_28: 'music/deadfish_28',
deadfish_29: 'music/deadfish_29',
fire: 'music/fire',
}
// 音乐要预加载的配置
for (const key in musicConfig) {
if (musicConfig.hasOwnProperty(key)) {
const path = `${GameConfig.GameName}/${musicConfig[key]}`
MusicConfig.musicKey2Path.set(key, path)
}
}
}
const musicConfig = {
background_1: 'music/background_1',
background_2: 'music/background_2',
background_3: 'music/background_3',
deadfish_1: 'music/deadfish_1',
deadfish_2: 'music/deadfish_2',
deadfish_3: 'music/deadfish_3',
deadfish_4: 'music/deadfish_4',
deadfish_5: 'music/deadfish_5',
deadfish_6: 'music/deadfish_6',
deadfish_7: 'music/deadfish_7',
deadfish_8: 'music/deadfish_8',
deadfish_9: 'music/deadfish_9',
deadfish_10: 'music/deadfish_10',
deadfish_11: 'music/deadfish_11',
deadfish_12: 'music/deadfish_12',
deadfish_13: 'music/deadfish_13',
deadfish_14: 'music/deadfish_14',
deadfish_15: 'music/deadfish_15',
deadfish_16: 'music/deadfish_16',
deadfish_17: 'music/deadfish_17',
deadfish_18: 'music/deadfish_18',
deadfish_19: 'music/deadfish_19',
deadfish_20: 'music/deadfish_20',
deadfish_21: 'music/deadfish_21',
deadfish_22: 'music/deadfish_22',
deadfish_23: 'music/deadfish_23',
deadfish_24: 'music/deadfish_24',
deadfish_25: 'music/deadfish_25',
deadfish_26: 'music/deadfish_26',
deadfish_27: 'music/deadfish_27',
deadfish_28: 'music/deadfish_28',
deadfish_29: 'music/deadfish_29',
fire: 'music/fire',
}
// 音乐要预加载的配置
for (const key in musicConfig) {
if (Object.prototype.hasOwnProperty.call(musicConfig, key)) {
const path = `${GameConfig.GameName}/${musicConfig[key]}`
MusicConfig.musicKey2Path.set(key, path)
}
}
}
}

View File

@@ -1,3 +1,3 @@
export default class NetConfig {
public static hotupdateUrl: string = 'http://localhost:33/hotupdate'
public static hotupdateUrl: string = 'http://localhost:33/hotupdate'
}

View File

@@ -1,50 +1,53 @@
import { _decorator, Component, instantiate, Label, Node, tween, Vec3 } from 'cc'
import PrefabLoader from '../utils/PrefabLoader'
import { Component, Label, Node, Vec3, _decorator, instantiate, tween } from 'cc'
import { GameConfig } from '../../game/config/GameConfig'
import PrefabLoader from '../utils/PrefabLoader'
import DialogBase from './DialogBase'
const { ccclass, property } = _decorator
@ccclass('CommonTips')
export default class CommonTips extends Component {
public static TipsZorderIndex: number = 999
@property({ type: Label })
txtContent: Label | null = null
private tips: string = ''
private static showingNameList: Array<string> = []
onLoad() {}
public static TipsZorderIndex: number = 999
@property({ type: Label })
txtContent: Label | null = null
start() {
tween(this.node)
.by(1.5, { position: new Vec3(0, 100, 0) })
.to(0.2, { /* opacity: 0*/ scale: Vec3.ZERO })
.call(() => {
this.node.destroy()
})
.start()
}
private tips: string = ''
private static showingNameList: Array<string> = []
onDestroy() {
let index: number = CommonTips.showingNameList.indexOf(this.tips)
CommonTips.showingNameList.splice(index, 1)
this.unscheduleAllCallbacks()
}
onLoad() {}
public static showMsg(msg: string, parentNode: Node = null) {
PrefabLoader.loadPrefab(
`${GameConfig.GameName}/share/uicomponent/CommonTips`,
(loadedResource) => {
parentNode = parentNode || DialogBase.GetRootCanvas()
if (CommonTips.showingNameList.indexOf(msg) === -1) {
CommonTips.showingNameList.push(msg)
}
let dialogNode = instantiate(loadedResource)
dialogNode.setPosition(0, 0)
let dialogScript: CommonTips = dialogNode.getComponent(CommonTips)
dialogScript.tips = msg
dialogScript.txtContent.string = msg
parentNode.insertChild(dialogNode, CommonTips.TipsZorderIndex)
}
)
}
start() {
tween(this.node)
.by(1.5, { position: new Vec3(0, 100, 0) })
.to(0.2, { /* opacity: 0 */ scale: Vec3.ZERO })
.call(() => {
this.node.destroy()
})
.start()
}
onDestroy() {
const index: number = CommonTips.showingNameList.indexOf(this.tips)
CommonTips.showingNameList.splice(index, 1)
this.unscheduleAllCallbacks()
}
public static showMsg(msg: string, parentNode: Node = null) {
PrefabLoader.loadPrefab(
`${GameConfig.GameName}/share/uicomponent/CommonTips`,
(loadedResource) => {
parentNode = parentNode || DialogBase.GetRootCanvas()
if (!CommonTips.showingNameList.includes(msg)) CommonTips.showingNameList.push(msg)
const dialogNode = instantiate(loadedResource)
dialogNode.setPosition(0, 0)
const dialogScript: CommonTips = dialogNode.getComponent(CommonTips)
dialogScript.tips = msg
dialogScript.txtContent.string = msg
parentNode.insertChild(dialogNode, CommonTips.TipsZorderIndex)
},
)
}
}

View File

@@ -1,30 +1,36 @@
import { _decorator, Component, instantiate, Node, Prefab, Widget } from 'cc'
import PrefabLoader from '../utils/PrefabLoader'
import { Component, Node, Prefab, Widget, _decorator, instantiate } from 'cc'
import { GameConfig } from '../../game/config/GameConfig'
import PrefabLoader from '../utils/PrefabLoader'
import DialogBase from './DialogBase'
const { ccclass, property } = _decorator
@ccclass('DarkLayer')
export default class DarkLayer extends Component {
private static prefab: Prefab
onLoad() {
this.getComponent(Widget).target = DialogBase.GetRootCanvas()
}
start() {}
public static preLoad(): Promise<void> {
return new Promise((resolve, reject) => {
PrefabLoader.loadPrefab(
`${GameConfig.GameName}/share/uicomponent/DarkLayer`,
(loadedResource) => {
DarkLayer.prefab = loadedResource
resolve()
}
)
})
}
public static getDarkLayer() {
let dialogNode: Node = instantiate(DarkLayer.prefab)
return dialogNode
}
private static prefab: Prefab
onLoad() {
this.getComponent(Widget).target = DialogBase.GetRootCanvas()
}
start() {}
public static preLoad(): Promise<void> {
return new Promise((resolve, reject) => {
PrefabLoader.loadPrefab(
`${GameConfig.GameName}/share/uicomponent/DarkLayer`,
(loadedResource) => {
DarkLayer.prefab = loadedResource
resolve()
},
)
})
}
public static getDarkLayer() {
const dialogNode: Node = instantiate(DarkLayer.prefab)
return dialogNode
}
}

View File

@@ -1,65 +1,65 @@
import { _decorator, Component, Node, Widget } from 'cc'
import DarkLayer from './DarkLayer'
import { Component, Node, Widget, _decorator } from 'cc'
import { UIRoot } from '../../game/utils/UIRoot'
import DarkLayer from './DarkLayer'
const { ccclass } = _decorator
@ccclass('DialogBase')
export default class DialogBase extends Component {
private static LocalZOrder: number = 5
private darkLayer: Node | null = null
private static LocalZOrder: number = 5
private darkLayer: Node | null = null
//private static _canvas: Node;
public static GetRootCanvas(): Node {
//if(DialogBase._canvas == null)
// DialogBase._canvas = director.getScene().getChildByName('Canvas');
//return DialogBase._canvas;
return UIRoot.Instance.node
}
onLoad() {
DialogBase.LocalZOrder += 1
let closeLayer: Node = this.node.getChildByName('closeLayer')
if (closeLayer) {
let closeLayerWidget: Widget = closeLayer.getComponent(Widget)
if (closeLayerWidget) {
closeLayerWidget.target = DialogBase.GetRootCanvas()
closeLayerWidget.left = 0
closeLayerWidget.right = 0
closeLayerWidget.top = 0
closeLayerWidget.bottom = 0
}
}
this.onLoadMe()
}
// private static _canvas: Node;
public static GetRootCanvas(): Node {
// if(DialogBase._canvas == null)
// DialogBase._canvas = director.getScene().getChildByName('Canvas');
// return DialogBase._canvas;
return UIRoot.Instance.node
}
onLoadMe() {}
onLoad() {
DialogBase.LocalZOrder += 1
const closeLayer: Node = this.node.getChildByName('closeLayer')
if (closeLayer) {
const closeLayerWidget: Widget = closeLayer.getComponent(Widget)
if (closeLayerWidget) {
closeLayerWidget.target = DialogBase.GetRootCanvas()
closeLayerWidget.left = 0
closeLayerWidget.right = 0
closeLayerWidget.top = 0
closeLayerWidget.bottom = 0
}
}
this.onLoadMe()
}
start(isPlayMv: boolean = false) {
this.darkLayer = DarkLayer.getDarkLayer()
this.node.insertChild(this.darkLayer, 0) //this.node.addChild(this.darkLayer, -1);
if (isPlayMv) {
this.node.setScale(0, 0)
} else {
this.onStartMe()
}
}
onLoadMe() {}
onStartMe() {}
start(isPlayMv: boolean = false) {
this.darkLayer = DarkLayer.getDarkLayer()
this.node.insertChild(this.darkLayer, 0) // this.node.addChild(this.darkLayer, -1);
if (isPlayMv) this.node.setScale(0, 0)
else this.onStartMe()
}
onClickClose() {
this.node.destroy()
}
onStartMe() {}
update(dt) {
this.onUpdateMe(dt)
}
onClickClose() {
this.node.destroy()
}
onUpdateMe(dt) {}
update(dt) {
this.onUpdateMe(dt)
}
onDestroy() {
DialogBase.LocalZOrder -= 1
this.onDestroyMe()
}
onUpdateMe(dt) {}
onDestroyMe() {}
onDestroy() {
DialogBase.LocalZOrder -= 1
this.onDestroyMe()
}
onDestroyMe() {}
}

View File

@@ -1,78 +1,76 @@
import { _decorator, Component, instantiate, Node, Prefab, Quat, Vec3 } from 'cc'
import PrefabLoader from '../utils/PrefabLoader'
import { Component, Node, Prefab, Quat, Vec3, _decorator, instantiate } from 'cc'
import { GameConfig } from '../../game/config/GameConfig'
import PrefabLoader from '../utils/PrefabLoader'
import DialogBase from './DialogBase'
const { ccclass, property } = _decorator
@ccclass('LoadingPrefab')
export default class LoadingPrefab extends Component {
public static instance: Node
private static prefab: Prefab
public static LoadingZorderIndex: number = 99
@property({ type: Node })
loadingSp: Node | null = null
public static instance: Node
private static prefab: Prefab
public static LoadingZorderIndex: number = 99
@property({ type: Node })
loadingSp: Node | null = null
private _quatCache: Quat
private _vec3Cache: Vec3
onLoad() {
this._quatCache = new Quat()
this._vec3Cache = new Vec3()
}
private _quatCache: Quat
private _vec3Cache: Vec3
start() {}
onLoad() {
this._quatCache = new Quat()
this._vec3Cache = new Vec3()
}
public static close() {
if (!LoadingPrefab.instance) {
return
}
LoadingPrefab.instance.removeFromParent()
LoadingPrefab.instance.destroy()
LoadingPrefab.instance = null
}
start() {}
public static preLoad(): Promise<void> {
return new Promise((resolve, reject) => {
PrefabLoader.loadPrefab(
GameConfig.GameName + '/' + 'share/uicomponent/LoadingPrefab',
(loadedResource) => {
LoadingPrefab.prefab = loadedResource
resolve()
}
)
})
}
public static close() {
if (!LoadingPrefab.instance) return
private static createLoadingPrefab(parentNode: Node = null) {
let dialogNode: Node = instantiate(LoadingPrefab.prefab)
LoadingPrefab.instance = dialogNode
if (!parentNode) {
parentNode = DialogBase.GetRootCanvas()
}
parentNode.insertChild(dialogNode, LoadingPrefab.LoadingZorderIndex)
dialogNode.setPosition(0, 0)
}
LoadingPrefab.instance.removeFromParent()
LoadingPrefab.instance.destroy()
LoadingPrefab.instance = null
}
public static async show(parentNode: Node = null) {
if (LoadingPrefab.instance) return
if (!LoadingPrefab.prefab) {
await LoadingPrefab.preLoad()
}
this.createLoadingPrefab(parentNode)
}
public static preLoad(): Promise<void> {
return new Promise((resolve, reject) => {
PrefabLoader.loadPrefab(
`${GameConfig.GameName}/share/uicomponent/LoadingPrefab`,
(loadedResource) => {
LoadingPrefab.prefab = loadedResource
resolve()
},
)
})
}
update(dt) {
this.loadingSp.getRotation(this._quatCache)
Quat.toEuler(this._vec3Cache, this._quatCache)
this._vec3Cache.z += 10
this.loadingSp.setRotationFromEuler(this._vec3Cache)
if (this._vec3Cache.z >= 360) {
this.loadingSp.getRotation(Quat.IDENTITY)
}
}
private static createLoadingPrefab(parentNode: Node = null) {
const dialogNode: Node = instantiate(LoadingPrefab.prefab)
LoadingPrefab.instance = dialogNode
if (!parentNode) parentNode = DialogBase.GetRootCanvas()
public static clear() {
LoadingPrefab.instance = null
LoadingPrefab.prefab = null
}
parentNode.insertChild(dialogNode, LoadingPrefab.LoadingZorderIndex)
dialogNode.setPosition(0, 0)
}
public static async show(parentNode: Node = null) {
if (LoadingPrefab.instance) return
if (!LoadingPrefab.prefab) await LoadingPrefab.preLoad()
this.createLoadingPrefab(parentNode)
}
update(dt) {
this.loadingSp.getRotation(this._quatCache)
Quat.toEuler(this._vec3Cache, this._quatCache)
this._vec3Cache.z += 10
this.loadingSp.setRotationFromEuler(this._vec3Cache)
if (this._vec3Cache.z >= 360) this.loadingSp.getRotation(Quat.IDENTITY)
}
public static clear() {
LoadingPrefab.instance = null
LoadingPrefab.prefab = null
}
}

View File

@@ -1,90 +1,76 @@
import { _decorator, Component, instantiate, Node, Prefab } from 'cc'
import PrefabLoader from '../utils/PrefabLoader'
import Progress from './Progress'
import { Component, Node, Prefab, _decorator, instantiate } from 'cc'
import { GameConfig } from '../../game/config/GameConfig'
import PrefabLoader from '../utils/PrefabLoader'
import DialogBase from './DialogBase'
import Progress from './Progress'
const { ccclass, property } = _decorator
@ccclass('LoadingScenePrefab')
export default class LoadingScenePrefab extends Component {
public static instance: Node
private static prefab: Prefab
public static LoadingZorderIndex: number = 99
@property({ type: Node })
private progressNode: Node | null = null
onLoad() {}
public static instance: Node
private static prefab: Prefab
public static LoadingZorderIndex: number = 99
@property({ type: Node })
private progressNode: Node | null = null
start() {}
onLoad() {}
public updateProgress(
completedCount: number,
totalCount: number,
item: any = null
) {
this.progressNode
.getComponent(Progress)
.updateProgress(
completedCount,
totalCount,
'消耗流量,预下载所有"鱼"类中,请耐心等待...'
)
}
start() {}
public static updateLoading(
completedCount: number,
totalCount: number,
item: any = null
) {
if (LoadingScenePrefab.instance) {
let nodeTs: LoadingScenePrefab =
LoadingScenePrefab.instance.getComponent(LoadingScenePrefab)
if (nodeTs) {
nodeTs.updateProgress(completedCount, totalCount, item)
}
}
}
public updateProgress(completedCount: number, totalCount: number, item: any = null) {
this.progressNode
.getComponent(Progress)
.updateProgress(completedCount, totalCount, '消耗流量,预下载所有"鱼"类中,请耐心等待...')
}
private static createPrefab(parentNode: Node = null) {
let dialogNode: Node = instantiate(LoadingScenePrefab.prefab)
LoadingScenePrefab.instance = dialogNode
if (!parentNode) {
parentNode = DialogBase.GetRootCanvas()
}
parentNode.insertChild(dialogNode, LoadingScenePrefab.LoadingZorderIndex)
dialogNode.setPosition(0, 0)
}
public static updateLoading(completedCount: number, totalCount: number, item: any = null) {
if (LoadingScenePrefab.instance) {
const nodeTs: LoadingScenePrefab =
LoadingScenePrefab.instance.getComponent(LoadingScenePrefab)
if (nodeTs) nodeTs.updateProgress(completedCount, totalCount, item)
}
}
public static preLoad(): Promise<void> {
return new Promise((resolve, reject) => {
PrefabLoader.loadPrefab(
GameConfig.GameName + '/' + 'share/uicomponent/LoadingScenePrefab',
(loadedResource: Prefab) => {
LoadingScenePrefab.prefab = loadedResource
resolve()
}
)
})
}
private static createPrefab(parentNode: Node = null) {
const dialogNode: Node = instantiate(LoadingScenePrefab.prefab)
LoadingScenePrefab.instance = dialogNode
if (!parentNode) parentNode = DialogBase.GetRootCanvas()
public static close() {
if (!LoadingScenePrefab.instance) {
return
}
LoadingScenePrefab.instance.destroy()
LoadingScenePrefab.instance = null
}
parentNode.insertChild(dialogNode, LoadingScenePrefab.LoadingZorderIndex)
dialogNode.setPosition(0, 0)
}
public static async show(parentNode: Node = null) {
if (LoadingScenePrefab.instance) return
if (!LoadingScenePrefab.prefab) {
await LoadingScenePrefab.preLoad()
}
this.createPrefab(parentNode)
}
public static preLoad(): Promise<void> {
return new Promise((resolve, reject) => {
PrefabLoader.loadPrefab(
`${GameConfig.GameName}/share/uicomponent/LoadingScenePrefab`,
(loadedResource: Prefab) => {
LoadingScenePrefab.prefab = loadedResource
resolve()
},
)
})
}
public static clear() {
LoadingScenePrefab.instance = null
LoadingScenePrefab.prefab = null
}
public static close() {
if (!LoadingScenePrefab.instance) return
LoadingScenePrefab.instance.destroy()
LoadingScenePrefab.instance = null
}
public static async show(parentNode: Node = null) {
if (LoadingScenePrefab.instance) return
if (!LoadingScenePrefab.prefab) await LoadingScenePrefab.preLoad()
this.createPrefab(parentNode)
}
public static clear() {
LoadingScenePrefab.instance = null
LoadingScenePrefab.prefab = null
}
}

View File

@@ -1,9 +1,18 @@
import { _decorator, AssetManager, AudioClip, AudioSource, Component, instantiate, Prefab } from 'cc'
import {
AssetManager,
AudioClip,
AudioSource,
Component,
Prefab,
_decorator,
instantiate,
} from 'cc'
import { GameConfig } from '../../game/config/GameConfig'
import MusicConfig from '../config/MusicConfig'
import LocalStorage from '../utils/LocalStorage'
import { Logger } from '../utils/Logger'
import PrefabLoader from '../utils/PrefabLoader'
import LocalStorage from '../utils/LocalStorage'
import MusicConfig from '../config/MusicConfig'
import { GameConfig } from '../../game/config/GameConfig'
const { ccclass, property } = _decorator
@@ -13,71 +22,59 @@ const { ccclass, property } = _decorator
@ccclass('MusicPrefab')
export default class MusicPrefab extends Component {
private static instance: MusicPrefab
private static MUSIC_VOLUMN_KEY: string = 'musicVolumn'
public static musicVolumn: number = 1
public static play(key: string) {
let url: string = MusicConfig.musicKey2Path.get(key)
if (url) {
AssetManager.instance.resources.load(
url,
AudioClip,
(error: Error, clip: AudioClip) => {
if (error) {
Logger.warn(this, 'load music error===', error.message)
} else {
if (clip) {
this.instance.node.getComponent(AudioSource).clip = clip
this.instance.node.getComponent(AudioSource).volume =
this.musicVolumn
this.instance.node.getComponent(AudioSource).play()
this.instance.node.getComponent(AudioSource).loop = true
}
}
}
)
} else {
Logger.warn(this, '播放不存在的music=', key)
}
}
private static instance: MusicPrefab
private static MUSIC_VOLUMN_KEY: string = 'musicVolumn'
public static musicVolumn: number = 1
public static changeVolumn(nowVolumn: number) {
this.musicVolumn = nowVolumn
this.instance.node.getComponent(AudioSource).volume = nowVolumn
LocalStorage.setItem(
MusicPrefab.MUSIC_VOLUMN_KEY,
this.musicVolumn.toString()
)
}
public static play(key: string) {
const url: string = MusicConfig.musicKey2Path.get(key)
if (url) {
AssetManager.instance.resources.load(url, AudioClip, (error: Error, clip: AudioClip) => {
if (error) {
Logger.warn(this, 'load music error===', error.message)
} else {
if (clip) {
this.instance.node.getComponent(AudioSource).clip = clip
this.instance.node.getComponent(AudioSource).volume = this.musicVolumn
this.instance.node.getComponent(AudioSource).play()
this.instance.node.getComponent(AudioSource).loop = true
}
}
})
} else {
Logger.warn(this, '播放不存在的music=', key)
}
}
private static preInit() {
this.musicVolumn = parseFloat(
LocalStorage.getItem(MusicPrefab.MUSIC_VOLUMN_KEY)
)
if (isNaN(this.musicVolumn)) {
this.musicVolumn = 1
}
}
public static changeVolumn(nowVolumn: number) {
this.musicVolumn = nowVolumn
this.instance.node.getComponent(AudioSource).volume = nowVolumn
LocalStorage.setItem(MusicPrefab.MUSIC_VOLUMN_KEY, this.musicVolumn.toString())
}
public static preLoad(): Promise<void> {
return new Promise((resolve, reject) => {
PrefabLoader.loadPrefab(
GameConfig.GameName + '/' + 'share/uicomponent/MusicPrefab',
(loadedResource: Prefab) => {
MusicPrefab.instance =
instantiate(loadedResource).getComponent(MusicPrefab)
this.preInit()
resolve()
}
)
})
}
private static preInit() {
this.musicVolumn = Number.parseFloat(LocalStorage.getItem(MusicPrefab.MUSIC_VOLUMN_KEY))
if (Number.isNaN(this.musicVolumn)) this.musicVolumn = 1
}
public static destory() {
if (MusicPrefab.instance) {
MusicPrefab.instance.getComponent(AudioSource).stop()
MusicPrefab.instance.destroy()
}
MusicPrefab.instance = null
}
public static preLoad(): Promise<void> {
return new Promise((resolve, reject) => {
PrefabLoader.loadPrefab(
`${GameConfig.GameName}/share/uicomponent/MusicPrefab`,
(loadedResource: Prefab) => {
MusicPrefab.instance = instantiate(loadedResource).getComponent(MusicPrefab)
this.preInit()
resolve()
},
)
})
}
public static destory() {
if (MusicPrefab.instance) {
MusicPrefab.instance.getComponent(AudioSource).stop()
MusicPrefab.instance.destroy()
}
MusicPrefab.instance = null
}
}

View File

@@ -1,56 +1,55 @@
import { _decorator, Component, Label, ProgressBar } from 'cc'
import { Component, Label, ProgressBar, _decorator } from 'cc'
const { ccclass, property } = _decorator
@ccclass('Progress')
export default class Progress extends Component {
@property(Label)
public percentLable: Label
@property(Label)
public percentLable: Label
@property(ProgressBar)
public bar: ProgressBar
@property(ProgressBar)
public bar: ProgressBar
onLoad() {
this.bar.node.active = false
this.bar.progress = 0
}
onLoad() {
this.bar.node.active = false
this.bar.progress = 0
}
start() {}
start() {}
updatePercent(current, filePercent) {
//this.percentLable.string = filePercent.toFixed(2);
}
updatePercent(current, filePercent) {
// this.percentLable.string = filePercent.toFixed(2);
}
updatefileTotal(current, filePercent) {
if (!this.bar.node.active) this.bar.node.active = true
var nowPercent = Math.round((current / filePercent) * 100)
var curMB = this.getMB(current)
var totalMB = this.getMB(filePercent)
// this.percentLable.string = "正在更新 " + nowPercent + "%" + " ( " + curMB + " / "+totalMB +" MB)";
nowPercent = Math.min(nowPercent, 100)
this.percentLable.string = '正在更新 ' + nowPercent + '%'
var percent = current / filePercent
this.bar.progress = percent
}
updatefileTotal(current: number, filePercent: number) {
if (!this.bar.node.active) this.bar.node.active = true
let nowPercent = Math.round((current / filePercent) * 100)
const curMB = this.getMB(current)
const totalMB = this.getMB(filePercent)
// this.percentLable.string = "正在更新 " + nowPercent + "%" + " ( " + curMB + " / "+totalMB +" MB)";
nowPercent = Math.min(nowPercent, 100)
this.percentLable.string = `正在更新 ${nowPercent}%`
this.bar.progress = current / filePercent
}
public updateProgress(
current,
total,
msg: string = '正在加载资源,此过程不消耗流量...'
) {
this.bar.node.active = true
// this.setMsg(msg+ current + "/" + total);
this.setMsg(msg)
this.bar.progress = current / total
}
public updateProgress(
current: number,
total: number,
msg: string = '正在加载资源,此过程不消耗流量...',
) {
this.bar.node.active = true
// this.setMsg(msg+ current + "/" + total);
this.setMsg(msg)
this.bar.progress = current / total
}
getMB(bytes) {
bytes /= 1024
bytes /= 1024
return bytes.toFixed(2)
}
getMB(bytes: number) {
bytes /= 1024
bytes /= 1024
return bytes.toFixed(2)
}
public setMsg(msg: string = '游戏加载中,请稍后...') {
this.percentLable.string = msg
}
public setMsg(msg: string = '游戏加载中,请稍后...') {
this.percentLable.string = msg
}
}

View File

@@ -1,11 +1,22 @@
import { _decorator, AssetManager, AudioClip, AudioSource, Component, instantiate, Node, NodePool, Prefab } from 'cc'
import { Logger } from '../utils/Logger'
import PrefabLoader from '../utils/PrefabLoader'
import LocalStorage from '../utils/LocalStorage'
import EventManager from '../utils/EventManager'
import {
AssetManager,
AudioClip,
AudioSource,
Component,
Node,
NodePool,
Prefab,
_decorator,
instantiate,
} from 'cc'
import { GameConfig } from '../../game/config/GameConfig'
import CommonEvent from '../config/CommonEvent'
import MusicConfig from '../config/MusicConfig'
import { GameConfig } from '../../game/config/GameConfig'
import EventManager from '../utils/EventManager'
import LocalStorage from '../utils/LocalStorage'
import { Logger } from '../utils/Logger'
import PrefabLoader from '../utils/PrefabLoader'
const { ccclass, property } = _decorator
@@ -16,120 +27,102 @@ const { ccclass, property } = _decorator
@ccclass('SoundPrefab')
export default class SoundPrefab extends Component {
private static prefab: Prefab | null = null
private static SOUND_VOLUMN_KEY: string = 'soundVolumn'
public static soundVolumn: number = 1
private static Pool_Init_Num: number = 30
private static pool: NodePool = new NodePool()
private static nowAudioNodeList: Array<Node> = []
private audioName: string = ''
private audioUrl: string = ''
private static getAudioNode() {
let node: Node = null
// if (this.pool.size() > 0) {
private static prefab: Prefab | null = null
private static SOUND_VOLUMN_KEY: string = 'soundVolumn'
public static soundVolumn: number = 1
private static Pool_Init_Num: number = 30
private static pool: NodePool = new NodePool()
private static nowAudioNodeList: Array<Node> = []
private audioName: string = ''
private audioUrl: string = ''
// node = this.pool.get();
// } else {
node = instantiate(this.prefab)
// }
return node
}
private static getAudioNode() {
let node: Node = null
// if (this.pool.size() > 0) {
public static play(key: string) {
let url: string = MusicConfig.musicKey2Path.get(key)
if (url) {
AssetManager.instance.resources.load(url, AudioClip, (error: Error, clip: AudioClip) => {
if (error) {
Logger.warn(this, 'load sound error===', error.message)
} else {
if (clip) {
let audioNode: Node = this.getAudioNode()
if (audioNode) {
audioNode.getComponent(AudioSource).clip = clip
audioNode.getComponent(AudioSource).volume =
SoundPrefab.soundVolumn
audioNode.getComponent(AudioSource).loop = false
audioNode.getComponent(AudioSource).currentTime = 0 //rewind();
audioNode.getComponent(AudioSource).play()
audioNode.getComponent(SoundPrefab).audioName = key
audioNode.getComponent(SoundPrefab).audioUrl = url
this.nowAudioNodeList.push(audioNode)
}
}
}
})
} else {
Logger.warn(this, '播放不存在的music=', key)
}
}
// node = this.pool.get();
// } else {
node = instantiate(this.prefab)
// }
return node
}
public static changeVolumn(nowVolumn: number) {
this.soundVolumn = nowVolumn
for (let i = 0; i < this.nowAudioNodeList.length; i++) {
let audioNode: Node = this.nowAudioNodeList[i]
let audioSource: AudioSource = audioNode.getComponent(AudioSource)
if (audioSource.playing) {
audioSource.volume = nowVolumn
}
}
LocalStorage.setItem(
SoundPrefab.SOUND_VOLUMN_KEY,
SoundPrefab.soundVolumn.toString()
)
}
public static play(key: string) {
const url: string = MusicConfig.musicKey2Path.get(key)
if (url) {
AssetManager.instance.resources.load(url, AudioClip, (error: Error, clip: AudioClip) => {
if (error) {
Logger.warn(this, 'load sound error===', error.message)
} else {
if (clip) {
const audioNode: Node = this.getAudioNode()
if (audioNode) {
audioNode.getComponent(AudioSource).clip = clip
audioNode.getComponent(AudioSource).volume = SoundPrefab.soundVolumn
audioNode.getComponent(AudioSource).loop = false
audioNode.getComponent(AudioSource).currentTime = 0 // rewind();
audioNode.getComponent(AudioSource).play()
audioNode.getComponent(SoundPrefab).audioName = key
audioNode.getComponent(SoundPrefab).audioUrl = url
this.nowAudioNodeList.push(audioNode)
}
}
}
})
} else {
Logger.warn(this, '播放不存在的music=', key)
}
}
private static preInit() {
EventManager.instance.addListener(
CommonEvent.Event_FrameUpdate,
this.updateFrame,
this
)
SoundPrefab.soundVolumn = parseFloat(
LocalStorage.getItem(SoundPrefab.SOUND_VOLUMN_KEY)
)
if (isNaN(SoundPrefab.soundVolumn)) {
SoundPrefab.soundVolumn = 1
}
}
public static changeVolumn(nowVolumn: number) {
this.soundVolumn = nowVolumn
for (let i = 0; i < this.nowAudioNodeList.length; i++) {
const audioNode: Node = this.nowAudioNodeList[i]
const audioSource: AudioSource = audioNode.getComponent(AudioSource)
if (audioSource.playing) audioSource.volume = nowVolumn
}
LocalStorage.setItem(SoundPrefab.SOUND_VOLUMN_KEY, SoundPrefab.soundVolumn.toString())
}
private static updateFrame() {
for (let i = 0; i < this.nowAudioNodeList.length; i++) {
let audioNode: Node = this.nowAudioNodeList[i]
let audioSource: AudioSource = audioNode.getComponent(AudioSource)
if (!audioSource.playing) {
SoundPrefab.nowAudioNodeList.splice(i, 1)
}
}
}
private static preInit() {
EventManager.instance.addListener(CommonEvent.Event_FrameUpdate, this.updateFrame, this)
SoundPrefab.soundVolumn = Number.parseFloat(LocalStorage.getItem(SoundPrefab.SOUND_VOLUMN_KEY))
if (Number.isNaN(SoundPrefab.soundVolumn)) SoundPrefab.soundVolumn = 1
}
public static preLoad(): Promise<void> {
return new Promise((resolve, reject) => {
PrefabLoader.loadPrefab(
GameConfig.GameName + '/' + 'share/uicomponent/SoundPrefab',
(loadedResource: Prefab) => {
SoundPrefab.prefab = loadedResource
this.preInit()
// for (let i = 0; i < this.Pool_Init_Num; i++) {
// let tempNode: cc.Node = cc.instantiate(loadedResource);
// this.pool.put(tempNode);
// }
resolve()
}
)
})
}
private static updateFrame() {
for (let i = 0; i < this.nowAudioNodeList.length; i++) {
const audioNode: Node = this.nowAudioNodeList[i]
const audioSource: AudioSource = audioNode.getComponent(AudioSource)
if (!audioSource.playing) SoundPrefab.nowAudioNodeList.splice(i, 1)
}
}
public static destory() {
EventManager.instance.removeListener(
CommonEvent.Event_FrameUpdate,
this.updateFrame
)
for (let i = 0; i < this.nowAudioNodeList.length; i++) {
let audioNode: Node = this.nowAudioNodeList[i]
audioNode.getComponent(AudioSource).stop()
audioNode.getComponent(AudioSource).destroy()
}
this.nowAudioNodeList = []
this.pool.clear()
}
public static preLoad(): Promise<void> {
return new Promise((resolve, reject) => {
PrefabLoader.loadPrefab(
`${GameConfig.GameName}/share/uicomponent/SoundPrefab`,
(loadedResource: Prefab) => {
SoundPrefab.prefab = loadedResource
this.preInit()
// for (let i = 0; i < this.Pool_Init_Num; i++) {
// let tempNode: cc.Node = cc.instantiate(loadedResource);
// this.pool.put(tempNode);
// }
resolve()
},
)
})
}
public static destory() {
EventManager.instance.removeListener(CommonEvent.Event_FrameUpdate, this.updateFrame)
for (let i = 0; i < this.nowAudioNodeList.length; i++) {
const audioNode: Node = this.nowAudioNodeList[i]
audioNode.getComponent(AudioSource).stop()
audioNode.getComponent(AudioSource).destroy()
}
this.nowAudioNodeList = []
this.pool.clear()
}
}

View File

@@ -1,21 +1,25 @@
import { _decorator, Component, SpriteFrame } from 'cc'
import { Component, SpriteFrame, _decorator } from 'cc'
const { ccclass, property } = _decorator
@ccclass('TextureMgr')
export default class TextureMgr extends Component {
@property({ type: [SpriteFrame] })
public Spriteset: SpriteFrame[] = []
@property({ type: [SpriteFrame] })
public Spriteset1: SpriteFrame[] = []
@property({ type: [SpriteFrame] })
public Spriteset2: SpriteFrame[] = []
@property({ type: [SpriteFrame] })
public Spriteset3: SpriteFrame[] = []
@property({ type: [SpriteFrame] })
public Spriteset4: SpriteFrame[] = []
@property({ type: [SpriteFrame] })
public Spriteset: SpriteFrame[] = []
onLoad() {
// // init logic
}
@property({ type: [SpriteFrame] })
public Spriteset1: SpriteFrame[] = []
@property({ type: [SpriteFrame] })
public Spriteset2: SpriteFrame[] = []
@property({ type: [SpriteFrame] })
public Spriteset3: SpriteFrame[] = []
@property({ type: [SpriteFrame] })
public Spriteset4: SpriteFrame[] = []
onLoad() {
// init logic
}
}

View File

@@ -10,29 +10,25 @@ export default class AdapterHelper {
public static fixApdater() {
log('v3.6没找到接口修改 fitHeight、fitWidth, 先在项目里写死fitHeight=true')
return
let framesize = view.getFrameSize()
if (!this.winSizeWidth) {
this.winSizeWidth = screen.width
this.winSizeHeiht = screen.height
}
let designsize = view.getDesignResolutionSize()
let canvas: Canvas = DialogBase.GetRootCanvas().getComponent(Canvas)
let ratio: number = framesize.height / framesize.width
let designRatio: number = designsize.height / designsize.width
if (ratio > designRatio) {
//canvas.fitHeight = false;
//canvas.fitWidth = true;
error(
'v3.6没找到接口修改 fitHeight、fitWidth, 先在项目里写死fitHeight=true'
)
} else {
//canvas.fitHeight = true;
//canvas.fitWidth = false;
error(
'v3.6没找到接口修改 fitHeight、fitWidth, 先在项目里写死fitHeight=true'
)
}
// return
// const framesize = view.getFrameSize()
// if (!this.winSizeWidth) {
// this.winSizeWidth = screen.width
// this.winSizeHeiht = screen.height
// }
// const designsize = view.getDesignResolutionSize()
// const canvas: Canvas = DialogBase.GetRootCanvas().getComponent(Canvas)
// const ratio: number = framesize.height / framesize.width
// const designRatio: number = designsize.height / designsize.width
// if (ratio > designRatio) {
// canvas.fitHeight = false;
// canvas.fitWidth = true;
// error('v3.6没找到接口修改 fitHeight、fitWidth, 先在项目里写死fitHeight=true')
// } else {
// // canvas.fitHeight = true;
// // canvas.fitWidth = false;
// error('v3.6没找到接口修改 fitHeight、fitWidth, 先在项目里写死fitHeight=true')
// }
}
}

View File

@@ -4,45 +4,39 @@ const { ccclass, property } = _decorator
@ccclass('BitUtil')
export default class BitUtil {
//index是二进制从右到左
// index是二进制从右到左
public static isBitSet(value: number, index: number): boolean {
let str: string = value.toString(2)
return parseInt(str[str.length - 1 - index]) == 1
const str: string = value.toString(2)
return Number.parseInt(str[str.length - 1 - index]) === 1
}
//从右到左计算
// 从右到左计算
public static setBitValue(value: number, index: number): number {
let newValue: number = value
let str: string = value.toString(2)
const str: string = value.toString(2)
let newStr: string = ''
let maxIndex = Math.max(str.length - 1, index)
const maxIndex = Math.max(str.length - 1, index)
for (let i = 0; i <= maxIndex; i++) {
if (index == i) {
newStr = '1' + newStr
if (index === i) {
newStr = `1${newStr}`
} else {
if (str[i] == undefined) {
newStr = '0' + newStr
} else {
newStr = str[i] + newStr
}
if (str[i] === undefined) newStr = `0${newStr}`
else newStr = str[i] + newStr
}
}
newValue = parseInt(newStr, 2)
newValue = Number.parseInt(newStr, 2)
return newValue
}
public static clearBitValue(value: number, index: number) {
let newValue: number = value
let str: string = value.toString(2)
const str: string = value.toString(2)
let newStr: string = ''
for (let i = str.length - 1; i >= 0; i--) {
if (index == str.length - 1 - i) {
newStr = '0' + newStr
} else {
newStr = str[i] + newStr
}
if (index === str.length - 1 - i) newStr = `0${newStr}`
else newStr = str[i] + newStr
}
newValue = parseInt(newStr, 2)
newValue = Number.parseInt(newStr, 2)
return newValue
}
}

View File

@@ -1,11 +1,11 @@
import { _decorator, Color } from 'cc'
import { Color, _decorator } from 'cc'
const { ccclass, property } = _decorator
@ccclass('ColorHelper')
export default class ColorHelper {
public static getColor(hexStr: string): Color {
let color: Color = Color.BLACK
const color: Color = Color.BLACK
return color.fromHEX(hexStr)
}
}

View File

@@ -1,136 +1,83 @@
export default class DateUtil {
public static formatNumStr(num: number) {
let str = '' + num
if (num < 10) {
str = '0' + num
}
let str = `${num}`
if (num < 10) str = `0${num}`
return str
}
public static formateYearMonthDayStr(timestamp: number) {
let date: Date = new Date(timestamp)
return (
date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
)
const date: Date = new Date(timestamp)
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
}
public static formateMonthDayStr(timestamp: number) {
let date: Date = new Date(timestamp)
return date.getMonth() + 1 + '月' + date.getDate() + '日'
const date: Date = new Date(timestamp)
return `${date.getMonth() + 1}${date.getDate()}`
}
// timestamp:1453094034000 2018-1-31 19:53:44
//根据时间戳返回 2018-1-31 19:53:44
// 根据时间戳返回 2018-1-31 19:53:44
public static formatDateStr(timestamp: number) {
let date: Date = new Date(timestamp)
return (
date.getFullYear() +
'-' +
(date.getMonth() + 1) +
'-' +
date.getDate() +
' ' +
this.formatNumStr(date.getHours()) +
':' +
this.formatNumStr(date.getMinutes()) +
':' +
this.formatNumStr(date.getSeconds())
)
const date: Date = new Date(timestamp)
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${this.formatNumStr(
date.getHours(),
)}:${this.formatNumStr(date.getMinutes())}:${this.formatNumStr(date.getSeconds())}`
}
// timestamp:1453094034000 2018-1-31-19-53-44
//根据时间戳返回 2018-1-31-19-53-44
// 根据时间戳返回 2018-1-31-19-53-44
public static formatDateStr2(timestamp: number) {
let date: Date = new Date(timestamp)
return (
date.getFullYear() +
'-' +
(date.getMonth() + 1) +
'-' +
date.getDate() +
'-' +
this.formatNumStr(date.getHours()) +
'-' +
this.formatNumStr(date.getMinutes()) +
'-' +
this.formatNumStr(date.getSeconds())
)
const date: Date = new Date(timestamp)
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}-${this.formatNumStr(date.getHours())}-${this.formatNumStr(date.getMinutes())}-${this.formatNumStr(date.getSeconds())}`
}
// timestamp:1453094034000 2018-1-31
//根据时间戳返回 2018-1-31
// 根据时间戳返回 2018-1-31
public static formatDateStr3(timestamp: number) {
let date: Date = new Date(timestamp)
return (
date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
)
const date: Date = new Date(timestamp)
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
}
// timestamp:1453094034000
//根据时间戳返回 19:53
// 根据时间戳返回 19:53
public static formatHourMinStr(timestamp: number) {
let date: Date = new Date(timestamp)
return (
this.formatNumStr(date.getHours()) +
':' +
this.formatNumStr(date.getMinutes())
)
const date: Date = new Date(timestamp)
return `${this.formatNumStr(date.getHours())}:${this.formatNumStr(date.getMinutes())}`
}
// timestamp:1453094034000
//根据时间戳返回 19:53:11
// 根据时间戳返回 19:53:11
public static formatHourMinSecondStr(timestamp: number) {
let date: Date = new Date(timestamp)
return (
this.formatNumStr(date.getHours()) +
':' +
this.formatNumStr(date.getMinutes()) +
':' +
this.formatNumStr(date.getSeconds())
)
const date: Date = new Date(timestamp)
return `${this.formatNumStr(date.getHours())}:${this.formatNumStr(date.getMinutes())}:${this.formatNumStr(date.getSeconds())}`
}
public static now(): number {
let date: Date = new Date()
const date: Date = new Date()
return date.getTime()
}
public static betweenTime(startTime: number, endTime: number) {
let date: Date = new Date()
if (date.getTime() >= startTime && date.getTime() <= endTime) {
return true
}
return false
const date: Date = new Date()
return date.getTime() >= startTime && date.getTime() <= endTime
}
//根据时间戳返回 1天19:53:11
// 根据时间戳返回 1天19:53:11
public static formatLeftTime(timestamp: number) {
let result: string = ''
let day: number = Math.floor(timestamp / (1000 * 60 * 60 * 24))
let hour: number = Math.floor(timestamp / (1000 * 60 * 60)) % 24
let min: number = Math.floor(timestamp / (1000 * 60)) % 60
let second: number = Math.floor(timestamp / 1000) % 60
result =
day +
'天' +
this.formatNumStr(hour) +
':' +
this.formatNumStr(min) +
':' +
this.formatNumStr(second)
return result
const day: number = Math.floor(timestamp / (1000 * 60 * 60 * 24))
const hour: number = Math.floor(timestamp / (1000 * 60 * 60)) % 24
const min: number = Math.floor(timestamp / (1000 * 60)) % 60
const second: number = Math.floor(timestamp / 1000) % 60
return `${day}${this.formatNumStr(hour)}:${this.formatNumStr(min)}:${this.formatNumStr(second)}`
}
public static isToday(dateTime: number): boolean {
let nowDate: Date = new Date()
let checkDate: Date = new Date(dateTime)
if (
checkDate.getFullYear() == nowDate.getFullYear() &&
checkDate.getMonth() == nowDate.getMonth() &&
checkDate.getDate() == nowDate.getDate()
) {
return true
}
return false
const nowDate: Date = new Date()
const checkDate: Date = new Date(dateTime)
return (
checkDate.getFullYear() === nowDate.getFullYear() &&
checkDate.getMonth() === nowDate.getMonth() &&
checkDate.getDate() === nowDate.getDate()
)
}
}

View File

@@ -1,4 +1,5 @@
import { Button, Color, Component, Node, Slider } from 'cc'
import ColorHelper from './ColorHelper'
export class HaoEvent {
@@ -18,20 +19,17 @@ export default class EventManager {
private callbackList = {}
public constructor() {
}
public constructor() {}
//注册事件
// 注册事件
public addListener(eventName: string, callback: Function, caller: any) {
if (this.callbackList[eventName]) {
let eventList: Array<HaoEvent> = this.callbackList[eventName]
//不同元件才放入,相同元件覆蓋
const eventList: Array<HaoEvent> = this.callbackList[eventName]
// 不同元件才放入,相同元件覆蓋
let add: boolean = true
for (let i = 0; i < eventList.length; i++) {
let event: HaoEvent = eventList[i]
if (caller === event.caller) {
add = false
}
const event: HaoEvent = eventList[i]
if (caller === event.caller) add = false
}
if (add) {
eventList.push(new HaoEvent(callback, caller))
@@ -46,7 +44,7 @@ export default class EventManager {
public removeListener(eventName: string, callback: Function) {
if (this.callbackList[eventName]) {
for (let i = this.callbackList[eventName].length - 1; i >= 0; i--) {
let event: HaoEvent = this.callbackList[eventName][i]
const event: HaoEvent = this.callbackList[eventName][i]
if (event.callback == callback) {
this.callbackList[eventName].splice(i, 1)
break
@@ -56,17 +54,15 @@ export default class EventManager {
}
public dispatchEvent(eventName, parameter?: any, ...restOfName: any[]) {
let eventList: Array<HaoEvent> = this.callbackList[eventName]
const eventList: Array<HaoEvent> = this.callbackList[eventName]
if (eventList) {
for (let i = eventList.length - 1; i >= 0; i--) {
let event: HaoEvent = eventList[i]
const event: HaoEvent = eventList[i]
event.callback.call(event.caller, event, parameter, ...restOfName)
if (event.isStop) {
break
}
if (event.isStop) break
}
for (let i = eventList.length - 1; i >= 0; i--) {
let event: HaoEvent = eventList[i]
const event: HaoEvent = eventList[i]
event.isStop = false
}
}
@@ -77,12 +73,12 @@ export default class EventManager {
objectNode: Node,
scriptName: string,
eventName: string,
data: any = null
data: any = null,
) {
var btn: Button = objectNode.addComponent(Button)
var clickEventHandler = new Component.EventHandler()
clickEventHandler.target = parentNode //这个 node 节点是你的事件处理代码组件所属的节点
clickEventHandler.component = scriptName //这个是代码文件名
const btn: Button = objectNode.addComponent(Button)
const clickEventHandler = new Component.EventHandler()
clickEventHandler.target = parentNode // 这个 node 节点是你的事件处理代码组件所属的节点
clickEventHandler.component = scriptName // 这个是代码文件名
clickEventHandler.handler = eventName
clickEventHandler.customEventData = data
btn.clickEvents.push(clickEventHandler)
@@ -94,12 +90,12 @@ export default class EventManager {
}
public removeBtnEffect(objectNode: Node) {
var b = objectNode.getComponent(Button)
const b = objectNode.getComponent(Button)
b.transition = Button.Transition.NONE
}
public addBtnEffect(objectNode: Node, scale: number = 1.1) {
var b = objectNode.getComponent(Button)
const b = objectNode.getComponent(Button)
b.transition = Button.Transition.SCALE
b.zoomScale = scale
}
@@ -107,24 +103,19 @@ export default class EventManager {
public addBtnEffect_color(
objectNode: Node,
normalC: Color = ColorHelper.getColor('#FFFFFF'),
pressC: Color = ColorHelper.getColor('#C0C0C0')
pressC: Color = ColorHelper.getColor('#C0C0C0'),
) {
var b = objectNode.getComponent(Button)
const b = objectNode.getComponent(Button)
b.transition = Button.Transition.COLOR
b.normalColor = normalC
b.pressedColor = pressC
}
public addSliderEvent(
parentNode: Node,
objectNode: Node,
EventName: string,
data: any
) {
var b = objectNode.getComponent(Slider)
var clickEventHandler = new Component.EventHandler()
clickEventHandler.target = parentNode //这个 node 节点是你的事件处理代码组件所属的节点
clickEventHandler.component = parentNode.name //这个是代码文件名
public addSliderEvent(parentNode: Node, objectNode: Node, EventName: string, data: any) {
const b = objectNode.getComponent(Slider)
const clickEventHandler = new Component.EventHandler()
clickEventHandler.target = parentNode // 这个 node 节点是你的事件处理代码组件所属的节点
clickEventHandler.component = parentNode.name // 这个是代码文件名
clickEventHandler.handler = EventName
clickEventHandler.customEventData = data
b.slideEvents.push(clickEventHandler)

View File

@@ -2,13 +2,11 @@ export default class HaoEncrypt {
public static encode(str: string) {
let result: string = ''
for (let i = 0; i < str.length; i++) {
//遍历字符串
// 遍历字符串
let code: number = str.charCodeAt(i) // //逐个提取每个字符并获取Unicode编码值
if (i % 2 == 0) {
code += 2
} else {
code += 1
}
if (i % 2 === 0) code += 2
else code += 1
result += String.fromCharCode(code)
}
return result
@@ -17,13 +15,10 @@ export default class HaoEncrypt {
public static decode(str: string) {
let result: string = ''
for (let i = 0; i < str.length; i++) {
//遍历字符串
// 遍历字符串
let code: number = str.charCodeAt(i) // //逐个提取每个字符并获取Unicode编码值
if (i % 2 == 0) {
code -= 2
} else {
code -= 1
}
if (i % 2 === 0) code -= 2
else code -= 1
result += String.fromCharCode(code)
}
return result

View File

@@ -1,18 +1,19 @@
import { native, sys } from 'cc'
import { Logger } from './Logger'
import EventManager from './EventManager'
import VersionManager from './VersionManager'
import ManifestConfig from '../config/ManifestConfig'
import ResourcePreload from '../../game/utils/ResourcePreload'
import CommonTips from '../uicomponent/CommonTips'
import EventManager from './EventManager'
import { Logger } from './Logger'
import VersionManager from './VersionManager'
export default class HotUpdate {
public static Event_CheckUpdate: string = 'Event_CheckUpdate'
public static Event_On_Progress: string = 'HotUpdate_Event_On_Progress'
public static Event_On_NeedUpdate: string = 'HotUpdate_Event_On_NeedUpdate'
public static Event_Finish_Update: string = 'HotUpdate_Event_Finish'
public static Event_On_ALREADY_UP_TO_DATE: string =
'HotUpdate_Event_On_ALREADY_UP_TO_DATE'
public static Event_On_ALREADY_UP_TO_DATE: string = 'HotUpdate_Event_On_ALREADY_UP_TO_DATE'
public static Event_On_Fail_Update: string = 'HotUpdate_Event_On_Fail_Update'
private _am: any
private _checkListener: null
@@ -27,21 +28,16 @@ export default class HotUpdate {
private key: string
private hotupdateIndex: number
constructor() {
}
constructor() {}
public init(
index: number,
key: string = 'Code-remote-asset',
manifestUrl: string
) {
public init(index: number, key: string = 'Code-remote-asset', manifestUrl: string) {
if (sys.isNative) {
this.hotupdateIndex = index
this.key = key
this.manifestUrl = manifestUrl
this.storagePath = '获取this.storagePath报错了'
Logger.log(this, 'init removeDirectory=', this.storagePath + '_temp')
Logger.log(this, 'init removeDirectory=', `${this.storagePath}_temp`)
}
this.needUpdate = false
this.isUpdating = false
@@ -52,38 +48,25 @@ export default class HotUpdate {
private jumpToPack() {
let url: string
if (sys.isNative) {
if (sys.os == sys.OS.ANDROID) {
url = VersionManager.instance.apkStoreUrl
} else if (sys.os == sys.OS.IOS) {
url = VersionManager.instance.iosStoreUrl
}
if (sys.os === sys.OS.ANDROID) url = VersionManager.instance.apkStoreUrl
else if (sys.os === sys.OS.IOS) url = VersionManager.instance.iosStoreUrl
}
Logger.info(
this,
'jumpToPack==androidurl===',
VersionManager.instance.apkStoreUrl
)
Logger.info(
this,
'jumpToPack==iosStoreUrl===',
VersionManager.instance.iosStoreUrl
)
Logger.info(this, 'jumpToPack==androidurl===', VersionManager.instance.apkStoreUrl)
Logger.info(this, 'jumpToPack==iosStoreUrl===', VersionManager.instance.iosStoreUrl)
Logger.info(this, 'jumpToPack=====', url)
sys.openURL(url)
// cc.game.end();
}
//显示强制更新,即更细包面板
// 显示强制更新,即更细包面板
private showPackUpdateDialog() {
CommonTips.showMsg(
'有新的版本需要更新,下载后请先卸载,以前的版本,再安装!'
)
CommonTips.showMsg('有新的版本需要更新,下载后请先卸载,以前的版本,再安装!')
this.jumpToPack()
this.showPackUpdateDialog()
}
private checkCb(event: any) {
Logger.log(this, 'checkCb Code: =================' + event.getEventCode())
Logger.log(this, `checkCb Code: =================${event.getEventCode()}`)
switch (event.getEventCode()) {
case native.EventAssetsManager.ERROR_NO_LOCAL_MANIFEST:
Logger.info(this, 'No local manifest file found, hot update skipped.')
@@ -103,18 +86,18 @@ export default class HotUpdate {
this,
'new version found, please try to update.',
this.localBigVersion,
this.remoteBigVersion
this.remoteBigVersion,
)
if (
this.key == VersionManager.Config_Key[0] &&
this.key === VersionManager.Config_Key[0] &&
this.localBigVersion < this.remoteBigVersion
) {
//更新大版本
// 更新大版本
Logger.info(
this,
'new version found, please try to update======packupdate=',
this.localBigVersion,
this.remoteBigVersion
this.remoteBigVersion,
)
this.showPackUpdateDialog()
} else {
@@ -122,14 +105,11 @@ export default class HotUpdate {
this,
'new version found, please try to update======hotupdate=',
this.localBigVersion,
this.remoteBigVersion
this.remoteBigVersion,
)
// this._am.update();
this.needUpdate = true
EventManager.instance.dispatchEvent(
HotUpdate.Event_On_NeedUpdate,
this.key
)
EventManager.instance.dispatchEvent(HotUpdate.Event_On_NeedUpdate, this.key)
}
break
case native.EventAssetsManager.UPDATE_PROGRESSION:
@@ -142,14 +122,14 @@ export default class HotUpdate {
'UPDATE_PROGRESSION2222==========',
this.key,
event.getDownloadedBytes(),
event.getTotalBytes()
event.getTotalBytes(),
)
if (event.getTotalBytes() > 0) {
EventManager.instance.dispatchEvent(
HotUpdate.Event_On_Progress,
event.getDownloadedBytes(),
event.getTotalBytes(),
this.key
this.key,
)
}
break
@@ -162,23 +142,16 @@ export default class HotUpdate {
this.failUpdate()
break
case native.EventAssetsManager.ERROR_UPDATING:
let fullFilePath: string = this.storagePath + '/' + event.getAssetId()
let tempFilePath: string =
this.storagePath + '_temp/' + event.getAssetId()
const fullFilePath: string = `${this.storagePath}/${event.getAssetId()}`
const tempFilePath: string = `${this.storagePath}_temp/${event.getAssetId()}`
Logger.warn(this, 'fullFilePath====', fullFilePath)
Logger.warn(this, 'tempFilePath====', tempFilePath)
// jsb.fileUtils.removeFile(tempFilePath);
Logger.warn(
this,
'ERROR_UPDATING=============',
event.getAssetId(),
event.getMessage()
)
Logger.warn(this, 'ERROR_UPDATING=============', event.getAssetId(), event.getMessage())
this.failUpdate()
break
default:
// this.failUpdate();
return
// this.failUpdate();
}
}
@@ -187,21 +160,20 @@ export default class HotUpdate {
Logger.log(this, 'Checking or updating ...')
return
}
let hotupdateUrlKey: string =
VersionManager.Config_Url_Key[this.hotupdateIndex]
const hotupdateUrlKey: string = VersionManager.Config_Url_Key[this.hotupdateIndex]
Logger.log(this, 'checkoutUpdate=====', this.manifestUrl, hotupdateUrlKey)
if (!this._am) {
this._am = new native.AssetsManager(
'',
this.storagePath,
this.versionCompareHandle.bind(this)
this.versionCompareHandle.bind(this),
)
}
// this._am.setMaxConcurrentTask(1);
let manifestStr: string = ManifestConfig.getManifestStr(hotupdateUrlKey)
const manifestStr: string = ManifestConfig.getManifestStr(hotupdateUrlKey)
Logger.log(this, 'checkUpdate=======manifestStr=======', manifestStr)
let manifest = new native.Manifest(manifestStr, this.storagePath)
this._am.setVerifyCallback(function(filePath, asset) {
const manifest = new native.Manifest(manifestStr, this.storagePath)
this._am.setVerifyCallback((filePath, asset) => {
return true
// var md5 = calculateMD5(filePath);
// if (md5 === asset.md5)
@@ -223,46 +195,33 @@ export default class HotUpdate {
private versionCompareHandle(versionA: string, versionB: string) {
const vA = versionA.split('.')
const vB = versionB.split('.')
Logger.log(
this,
'versionCompareHandle======',
this.key,
VersionManager.Config_Key[0]
)
if (this.key == VersionManager.Config_Key[0]) {
Logger.log(this, 'versionCompareHandle======', this.key, VersionManager.Config_Key[0])
if (this.key === VersionManager.Config_Key[0]) {
Logger.log(this, 'versionCompareHandle22===', versionA, versionB)
VersionManager.instance.nowVersion = versionA
VersionManager.instance.targetVersion = versionB
}
this.localBigVersion = parseInt(vA[0])
this.remoteBigVersion = parseInt(vB[0])
this.localBigVersion = Number.parseInt(vA[0])
this.remoteBigVersion = Number.parseInt(vB[0])
for (let i = 0; i < vA.length; ++i) {
const a = parseInt(vA[i])
const b = parseInt(vB[i] || '0')
const a = Number.parseInt(vA[i])
const b = Number.parseInt(vB[i] || '0')
if (a !== b) return a - b
}
if (vB.length > vA.length) {
return -1
} else {
return 0
}
if (vB.length > vA.length) return -1
else return 0
}
public startUpdate() {
if (this.isUpdating) return
let localManifest = this._am.getLocalManifest()
let remoteManifest = this._am.getRemoteManifest()
const localManifest = this._am.getLocalManifest()
const remoteManifest = this._am.getRemoteManifest()
Logger.log(this, 'startUpdate111===', localManifest.getVersionFileUrl())
Logger.log(this, 'startUpdate2222===', localManifest.getManifestFileUrl())
Logger.log(this, 'startUpdate3333===', remoteManifest.getVersionFileUrl())
Logger.log(this, 'startUpdate4444===', remoteManifest.getManifestFileUrl())
this.isUpdating = true
EventManager.instance.dispatchEvent(
HotUpdate.Event_On_Progress,
0,
100,
this.key
)
EventManager.instance.dispatchEvent(HotUpdate.Event_On_Progress, 0, 100, this.key)
this._am.update()
}
@@ -280,42 +239,19 @@ export default class HotUpdate {
private failUpdate() {
this.disposeUpdate()
this.isCheck = false
EventManager.instance.dispatchEvent(
HotUpdate.Event_On_Fail_Update,
this.key
)
EventManager.instance.dispatchEvent(HotUpdate.Event_On_Fail_Update, this.key)
}
private alreadyUpToDate() {
this.disposeUpdate()
this.isFinishUpdate = true
EventManager.instance.dispatchEvent(
HotUpdate.Event_On_ALREADY_UP_TO_DATE,
this.key
)
EventManager.instance.dispatchEvent(HotUpdate.Event_On_ALREADY_UP_TO_DATE, this.key)
}
private finishUpdate(needRestart: boolean) {
Logger.info(this, '更新完成=====', needRestart)
this.disposeUpdate()
this.isFinishUpdate = true
EventManager.instance.dispatchEvent(
HotUpdate.Event_Finish_Update,
this.key,
needRestart
)
if (false && needRestart) {
//暂时不想修 fileUtils 这个报错
var searchPaths = '' //jsb.fileUtils.getSearchPaths();暂时注释
Logger.info(this, '更新完成====searchPaths======', searchPaths)
sys.localStorage.setItem(
'HotUpdateSearchPaths',
JSON.stringify(searchPaths)
)
//jsb.fileUtils.setSearchPaths(searchPaths);暂时注释
if (this.key == VersionManager.Config_Key[0]) {
ResourcePreload.instance.restartGame()
}
}
EventManager.instance.dispatchEvent(HotUpdate.Event_Finish_Update, this.key, needRestart)
}
}

View File

@@ -1,13 +1,14 @@
import { _decorator } from 'cc'
import { Logger } from './Logger'
const { ccclass } = _decorator
@ccclass('HttpClient')
export default class HttpClient {
public static instance: HttpClient //= new HttpClient();
public static instance: HttpClient // = new HttpClient();
//example
// example
// HttpClient.instance.request("http://localhost:8080/haohttp/test", ()=>{
// console.log("http 请求 end=============");
// }, {"nickName":"jhao", "hh":1, "id":9527});
@@ -27,12 +28,10 @@ export default class HttpClient {
let resParams = ''
let nowIndex = 1
for (const key in paramsObj) {
if (paramsObj.hasOwnProperty(key)) {
if (nowIndex == 1) {
resParams += key + '=' + paramsObj[key]
} else {
resParams += '&' + key + '=' + paramsObj[key]
}
if (Object.prototype.hasOwnProperty.call(paramsObj, key)) {
if (nowIndex === 1) resParams += `${key}=${paramsObj[key]}`
else resParams += `&${key}=${paramsObj[key]}`
nowIndex += 1
}
}
@@ -44,41 +43,29 @@ export default class HttpClient {
this.responseType = responseType
}
public setContentType() {
}
public setContentType() {}
public request(
url: string,
callback: Function,
params: any = null,
timeOut: number = 5 * 1000
) {
if (params && this.methodType == 'GET') {
public request(url: string, callback: Function, params: any = null, timeOut: number = 5 * 1000) {
if (params && this.methodType === 'GET') {
let getParams: string = this.setParams(params)
// getParams = StringUtil:encodeURI(params)
getParams = encodeURI(getParams)
url += '?' + getParams
url += `?${getParams}`
}
this.xhr = new XMLHttpRequest() // http请求 fget
//this.xhr = cc.loader.getXMLHttpRequest();
let xhr: XMLHttpRequest = this.xhr
// this.xhr = cc.loader.getXMLHttpRequest();
const xhr: XMLHttpRequest = this.xhr
xhr.responseType = this.responseType
xhr.timeout = timeOut
// xhr.setRequestHeader("Content-Type", "text/plain");
xhr.onreadystatechange = () => {
Logger.log(
this,
'status======',
xhr.status,
xhr.readyState,
xhr.statusText
)
Logger.log(this, 'status======', xhr.status, xhr.readyState, xhr.statusText)
// if (xhr.readyState == 4 && (xhr.status >= 200 && xhr.status < 400)) {
if (xhr.readyState == 4 && xhr.status == 200) {
let response = xhr.response
if (xhr.readyState === 4 && xhr.status === 200) {
const response = xhr.response
Logger.log(this, 'http response1============', xhr)
try {
let testJson = JSON.stringify(response)
const testJson = JSON.stringify(response)
Logger.log(this, 'http response json============', testJson)
if (callback) {
callback(true, response)
@@ -91,31 +78,21 @@ export default class HttpClient {
callback = null
}
}
} else if (xhr.readyState == 4 && xhr.status == 301) {
//域名转移
Logger.log(
this,
'http response222============',
xhr.getResponseHeader('Location')
)
} else if (xhr.readyState === 4 && xhr.status === 301) {
// 域名转移
Logger.log(this, 'http response222============', xhr.getResponseHeader('Location'))
// console.log("http response333============", xhr.getAllResponseHeaders());
if (HttpClient.instance == null) HttpClient.instance = new HttpClient()
HttpClient.instance.request(xhr.getResponseHeader('Location'), callback)
} else if (xhr.readyState == 4 && xhr.status == 404) {
} else if (xhr.readyState === 4 && xhr.status === 404) {
Logger.log(this, 'http onError============')
if (callback) {
callback(false)
callback = null
}
} else {
Logger.log(
this,
'onreadystatechange else====',
xhr.status,
xhr.readyState,
xhr.response
)
if (xhr.readyState == 4) {
Logger.log(this, 'onreadystatechange else====', xhr.status, xhr.readyState, xhr.response)
if (xhr.readyState === 4) {
Logger.log(this, 'http onError else============')
if (callback) {
callback(false)
@@ -125,13 +102,7 @@ export default class HttpClient {
}
}
xhr.onprogress = () => {
Logger.log(
this,
'http onprogress===',
xhr.status,
xhr.readyState,
xhr.response
)
Logger.log(this, 'http onprogress===', xhr.status, xhr.readyState, xhr.response)
}
xhr.onerror = () => {
Logger.log(this, 'http onError============')
@@ -155,6 +126,5 @@ export default class HttpClient {
xhr.send(params)
}
public getInfo(callback: Function = null) {
}
public getInfo(callback: Function = null) {}
}

View File

@@ -16,11 +16,10 @@ export default class LocalStorage {
}
public static getInt(key: string): number {
let tempValue: string = LocalStorage.getItem(key)
const tempValue: string = LocalStorage.getItem(key)
let result: number = 0
if (tempValue) {
result = parseInt(tempValue)
}
if (tempValue) result = Number.parseInt(tempValue)
return result
}
@@ -29,11 +28,10 @@ export default class LocalStorage {
}
public static getFloat(key: string): number {
let tempValue: string = LocalStorage.getItem(key)
const tempValue: string = LocalStorage.getItem(key)
let result: number = 0
if (tempValue) {
result = parseFloat(tempValue)
}
if (tempValue) result = Number.parseFloat(tempValue)
return result
}
@@ -42,19 +40,13 @@ export default class LocalStorage {
}
public static getBoolean(key: string): boolean {
let temp: number = LocalStorage.getInt(key)
if (temp == 1) {
return true
}
return false
const temp: number = LocalStorage.getInt(key)
return temp === 1
}
public static setBoolean(key: string, value: boolean) {
if (value) {
LocalStorage.setInt(key, 1)
} else {
LocalStorage.setInt(key, 0)
}
if (value) LocalStorage.setInt(key, 1)
else LocalStorage.setInt(key, 0)
}
public static clear() {

View File

@@ -9,130 +9,78 @@ class LOG_LEVEL_TYPES {
const Log_Level_Names: Array<string> = ['debug', 'log', 'info', 'warn', 'error']
export class Logger {
public static tag: string = '[HaoJslog]' //可以设置当前游戏的前缀
public static LEVEL: number = LOG_LEVEL_TYPES.WARN //当前Logger等级
public static tag: string = '[HaoJslog]' // 可以设置当前游戏的前缀
public static LEVEL: number = LOG_LEVEL_TYPES.WARN // 当前Logger等级
public static Log_Color_Config: Array<string> = [
'color:#890;font-size:10px;',
'color:#000;font-size:11px;',
'color:#09f;font-size:12px;',
'color:#f90;font-size:13px;',
'color:#f00;font-size:15px;'
'color:#f00;font-size:15px;',
]
private static Terminal_Log: boolean = false
public static formatNow() {
let date: Date = new Date() //后端返回的时间戳是秒
return (
date.getFullYear() +
'-' +
(date.getMonth() + 1) +
'-' +
date.getDate() +
' ' +
date.getHours() +
':' +
date.getMinutes() +
':' +
date.getSeconds() +
':' +
date.getMilliseconds()
)
const date: Date = new Date() // 后端返回的时间戳是秒
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}:${date.getMilliseconds()}`
}
private static getLogPreKey(nowLevel: number): string {
return '[' +
Logger.formatNow() +
'] ' +
Logger.tag +
' [' +
Log_Level_Names[nowLevel] +
'] '
return `[${Logger.formatNow()}] ${Logger.tag} [${Log_Level_Names[nowLevel]}] `
}
public static debug(...params: any) {
if (Logger.LEVEL > LOG_LEVEL_TYPES.DEBUG) {
if (Logger.LEVEL > LOG_LEVEL_TYPES.DEBUG)
return
}
let str: string = this.getLogPreKey(LOG_LEVEL_TYPES.DEBUG)
let fileStr: string = str + params.join(' ')
const str: string = this.getLogPreKey(LOG_LEVEL_TYPES.DEBUG)
const fileStr: string = str + params.join(' ')
// LogErrorFileUtil.debug(fileStr);
if (this.Terminal_Log) {
console.log(
'%c' + str,
this.Log_Color_Config[LOG_LEVEL_TYPES.DEBUG],
...params
)
} else {
console.info(fileStr)
}
if (this.Terminal_Log)
console.log(`%c${str}`, this.Log_Color_Config[LOG_LEVEL_TYPES.DEBUG], ...params)
else console.info(fileStr)
}
public static log(...params: any) {
if (Logger.LEVEL > LOG_LEVEL_TYPES.LOG) {
if (Logger.LEVEL > LOG_LEVEL_TYPES.LOG)
return
}
let str: string = this.getLogPreKey(LOG_LEVEL_TYPES.LOG)
let fileStr: string = str + params.join(' ')
const str: string = this.getLogPreKey(LOG_LEVEL_TYPES.LOG)
const fileStr: string = str + params.join(' ')
// LogErrorFileUtil.log(fileStr);
if (this.Terminal_Log) {
console.log(
'%c' + str,
this.Log_Color_Config[LOG_LEVEL_TYPES.DEBUG],
...params
)
} else {
console.info(fileStr) //console.log(str, ...params)
}
if (this.Terminal_Log)
console.log(`%c${str}`, this.Log_Color_Config[LOG_LEVEL_TYPES.DEBUG], ...params)
else console.info(fileStr) // console.log(str, ...params)
}
public static info(...params: any) {
if (Logger.LEVEL > LOG_LEVEL_TYPES.INFO) {
return
}
let str: string = this.getLogPreKey(LOG_LEVEL_TYPES.INFO)
let fileStr: string = str + params.join(' ')
if (this.Terminal_Log) {
console.info(
'%c' + str,
this.Log_Color_Config[LOG_LEVEL_TYPES.DEBUG],
...params
)
} else {
console.info(fileStr)
}
if (Logger.LEVEL > LOG_LEVEL_TYPES.INFO) return
const str: string = this.getLogPreKey(LOG_LEVEL_TYPES.INFO)
const fileStr: string = str + params.join(' ')
if (this.Terminal_Log)
console.info(`%c${str}`, this.Log_Color_Config[LOG_LEVEL_TYPES.DEBUG], ...params)
else console.info(fileStr)
}
public static warn(...params: any) {
if (Logger.LEVEL > LOG_LEVEL_TYPES.WARN) {
if (Logger.LEVEL > LOG_LEVEL_TYPES.WARN)
return
}
let str: string = this.getLogPreKey(LOG_LEVEL_TYPES.WARN)
let fileStr: string = str + params.join(' ')
if (this.Terminal_Log) {
console.warn(
'%c' + str,
this.Log_Color_Config[LOG_LEVEL_TYPES.DEBUG],
...params
)
} else {
console.warn(fileStr)
}
const str: string = this.getLogPreKey(LOG_LEVEL_TYPES.WARN)
const fileStr: string = str + params.join(' ')
if (this.Terminal_Log)
console.warn(`%c${str}`, this.Log_Color_Config[LOG_LEVEL_TYPES.DEBUG], ...params)
else console.warn(fileStr)
}
public static error(...params: any) {
if (Logger.LEVEL > LOG_LEVEL_TYPES.ERROR) {
return
}
let str: string = this.getLogPreKey(LOG_LEVEL_TYPES.ERROR)
let fileStr: string = str + params.join(' ')
if (this.Terminal_Log) {
console.error(
'%c' + str,
this.Log_Color_Config[LOG_LEVEL_TYPES.DEBUG],
...params
)
} else {
console.error(fileStr)
}
if (Logger.LEVEL > LOG_LEVEL_TYPES.ERROR) return
const str: string = this.getLogPreKey(LOG_LEVEL_TYPES.ERROR)
const fileStr: string = str + params.join(' ')
if (this.Terminal_Log)
console.error(`%c${str}`, this.Log_Color_Config[LOG_LEVEL_TYPES.DEBUG], ...params)
else console.error(fileStr)
}
}

View File

@@ -11,7 +11,7 @@ export default class MathUtils {
public static distance(x1: number, y1: number, x2: number, y2: number) {
// 设两点AX1,Y1,BX2,Y2
// 距离D=X2-X1的平方+Y2-Y1平方的和开平方
return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2))
return Math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
}
/**
@@ -45,7 +45,7 @@ export default class MathUtils {
* @param endP
*/
public static p2pRad(startP: Vec2, endP: Vec2) {
let rad: number = Math.atan2(endP.y - startP.y, endP.x - startP.x)
const rad: number = Math.atan2(endP.y - startP.y, endP.x - startP.x)
return rad
}
@@ -54,11 +54,8 @@ export default class MathUtils {
* @param rot
*/
public static rotation2Fish(rot: number) {
if (rot >= 0 && rot <= 180) {
rot = 180 - rot
} else {
rot = -180 - rot
}
if (rot >= 0 && rot <= 180) rot = 180 - rot
else rot = -180 - rot
return rot
}
}

View File

@@ -1,4 +1,5 @@
import { Node, Vec2, Vec3 } from 'cc'
import MathUtils from './MathUtils'
export class MoveHelper {
@@ -11,7 +12,7 @@ export class MoveHelper {
speed: number,
tx: number,
ty: number,
minSpeed: number = 0.01
minSpeed: number = 0.01,
) {
let isMoving: boolean = false
let times: number = 0
@@ -20,9 +21,9 @@ export class MoveHelper {
MoveHelper._vec2_0.y = MoveHelper._vec3.y
MoveHelper._vec2_1.x = tx
MoveHelper._vec2_1.y = ty
let rad: number = MathUtils.p2pRad(MoveHelper._vec2_0, MoveHelper._vec2_1)
let speedX: number = speed * Math.cos(rad)
let speedY: number = speed * Math.sin(rad)
const rad: number = MathUtils.p2pRad(MoveHelper._vec2_0, MoveHelper._vec2_1)
const speedX: number = speed * Math.cos(rad)
const speedY: number = speed * Math.sin(rad)
if (Math.abs(MoveHelper._vec3.x - tx) > minSpeed) {
times = Math.floor(Math.abs(speedX / minSpeed))
for (let i = 0; i < times; i++) {

View File

@@ -1,4 +1,5 @@
import { _decorator, AssetManager, Prefab } from 'cc'
import { AssetManager, Prefab, _decorator } from 'cc'
import { Logger } from './Logger'
const { ccclass, property } = _decorator
@@ -10,21 +11,17 @@ export default class PrefabLoader {
public static loadPrefab(url: string, callback: Function) {
if (this.isLoading) return
this.isLoading = true
AssetManager.instance.resources.load(
url,
Prefab,
(error: Error, loadedResource) => {
if (error) {
Logger.warn(this, '载入Prefab失败, 原因:', url, error.message)
return
}
if (!(loadedResource instanceof Prefab)) {
Logger.warn(this, '你载入的不是Prefab, 你做了什么事?')
return
}
callback(loadedResource)
this.isLoading = false
AssetManager.instance.resources.load(url, Prefab, (error: Error, loadedResource) => {
if (error) {
Logger.warn(this, '载入Prefab失败, 原因:', url, error.message)
return
}
)
if (!(loadedResource instanceof Prefab)) {
Logger.warn(this, '你载入的不是Prefab, 你做了什么事?')
return
}
callback(loadedResource)
this.isLoading = false
})
}
}

View File

@@ -1,7 +1,7 @@
import { Vec2 } from 'cc'
export default class RandomUtil {
//随机minNum到maxNum的数字 包含maxNum
// 随机minNum到maxNum的数字 包含maxNum
public static nextInt(minNum: number, maxNum: number) {
return Math.floor(Math.random() * (maxNum - minNum + 1) + minNum)
}
@@ -11,27 +11,24 @@ export default class RandomUtil {
}
public static nextSign() {
let temp = Math.random()
if (temp < 0.5) {
return 1
}
const temp = Math.random()
if (temp < 0.5) return 1
return -1
}
public static nextBoolean() {
let temp = Math.random()
return temp < 0.5;
const temp = Math.random()
return temp < 0.5
}
public static randomArr(nowArr: Array<any>, needNum: number) {
let tempArr: Array<any> = nowArr.concat()
let resultArr: Array<any> = []
const tempArr: Array<any> = nowArr.concat()
const resultArr: Array<any> = []
for (let index = 0; index < needNum; index++) {
if (tempArr.length <= 0) {
break
}
let randomIndex: number = RandomUtil.nextInt(0, tempArr.length - 1)
if (tempArr.length <= 0) break
const randomIndex: number = RandomUtil.nextInt(0, tempArr.length - 1)
resultArr.push(tempArr.splice(randomIndex, 1)[0])
}
return resultArr
@@ -42,8 +39,8 @@ export default class RandomUtil {
}
public static randomP(left: number, right: number, up: number, down: number) {
let randomX: number = RandomUtil.nextNumber(left, right)
let randomY: number = RandomUtil.nextNumber(up, down)
const randomX: number = RandomUtil.nextNumber(left, right)
const randomY: number = RandomUtil.nextNumber(up, down)
return new Vec2(randomX, randomY)
}
}

View File

@@ -1,4 +1,5 @@
import { Color, Material, Node, UIRenderer, UITransform, Vec2 } from 'cc'
import ShaderMaterialPrefab from '../../game/prefab/ShaderMaterialPrefab'
export default class ShaderHelper {
@@ -9,21 +10,15 @@ export default class ShaderHelper {
*/
public static clearAllEffect(
showNode: Node,
material: Material = ShaderMaterialPrefab.instance.getComponent(
ShaderMaterialPrefab
).default
material: Material = ShaderMaterialPrefab.instance.getComponent(ShaderMaterialPrefab).default,
) {
showNode
.getComponents(UIRenderer)
.forEach((renderComponent: UIRenderer) => {
showNode.getComponents(UIRenderer).forEach((renderComponent: UIRenderer) => {
renderComponent.setSharedMaterial(material, 0)
})
showNode.children.forEach((childNode) => {
childNode.getComponents(UIRenderer).forEach((renderComponent: UIRenderer) => {
renderComponent.setSharedMaterial(material, 0)
})
showNode.children.forEach((childNode) => {
childNode
.getComponents(UIRenderer)
.forEach((renderComponent: UIRenderer) => {
renderComponent.setSharedMaterial(material, 0)
})
})
}
@@ -36,23 +31,18 @@ export default class ShaderHelper {
public static setGrayEffect(
showNode: Node,
grayLevel: number = 1,
material: Material = ShaderMaterialPrefab.instance.getComponent(
ShaderMaterialPrefab
).grayMaterial
material: Material = ShaderMaterialPrefab.instance.getComponent(ShaderMaterialPrefab)
.grayMaterial,
) {
showNode
.getComponents(UIRenderer)
.forEach((renderComponent: UIRenderer) => {
material.setProperty('grayLevel', grayLevel)
renderComponent.setMaterial(material, 0)
})
showNode.getComponents(UIRenderer).forEach((renderComponent: UIRenderer) => {
material.setProperty('grayLevel', grayLevel)
renderComponent.setMaterial(material, 0)
})
showNode.children.forEach((childNode) => {
childNode
.getComponents(UIRenderer)
.forEach((renderComponent: UIRenderer) => {
material.setProperty('grayLevel', grayLevel)
renderComponent.setSharedMaterial(material, 0)
})
childNode.getComponents(UIRenderer).forEach((renderComponent: UIRenderer) => {
material.setProperty('grayLevel', grayLevel)
renderComponent.setSharedMaterial(material, 0)
})
})
}
@@ -61,15 +51,13 @@ export default class ShaderHelper {
*/
public static showGrayMv(showNode: Node) {
let grayValue: number = 0.5
let intervalId = setInterval(() => {
const intervalId = setInterval(() => {
grayValue += 0.01
if (grayValue >= 1) {
grayValue = 1
clearInterval(intervalId)
}
if (showNode) {
ShaderHelper.setGrayEffect(showNode, grayValue)
}
if (showNode) ShaderHelper.setGrayEffect(showNode, grayValue)
}, 1)
}
@@ -82,23 +70,17 @@ export default class ShaderHelper {
public static setOldPhotoEffect(
showNode: Node,
grayLevel: number = 1,
material: Material = ShaderMaterialPrefab.instance.getComponent(
ShaderMaterialPrefab
).oldPhoto
material: Material = ShaderMaterialPrefab.instance.getComponent(ShaderMaterialPrefab).oldPhoto,
) {
showNode
.getComponents(UIRenderer)
.forEach((renderComponent: UIRenderer) => {
showNode.getComponents(UIRenderer).forEach((renderComponent: UIRenderer) => {
material.setProperty('oldLevel', grayLevel)
renderComponent.setSharedMaterial(material, 0)
})
showNode.children.forEach((childNode) => {
childNode.getComponents(UIRenderer).forEach((renderComponent: UIRenderer) => {
material.setProperty('oldLevel', grayLevel)
renderComponent.setSharedMaterial(material, 0)
})
showNode.children.forEach((childNode) => {
childNode
.getComponents(UIRenderer)
.forEach((renderComponent: UIRenderer) => {
material.setProperty('oldLevel', grayLevel)
renderComponent.setSharedMaterial(material, 0)
})
})
}
@@ -107,15 +89,13 @@ export default class ShaderHelper {
*/
public static showOldPhotoMv(showNode: Node) {
let grayValue: number = 0
let intervalId = setInterval(() => {
const intervalId = setInterval(() => {
grayValue += 0.01
if (grayValue >= 1) {
grayValue = 1
clearInterval(intervalId)
}
if (showNode) {
ShaderHelper.setOldPhotoEffect(showNode, grayValue)
}
if (showNode) ShaderHelper.setOldPhotoEffect(showNode, grayValue)
}, 1)
}
@@ -131,27 +111,21 @@ export default class ShaderHelper {
public static setGlowInner(
showNode: Node,
materialParam: any,
material: Material = ShaderMaterialPrefab.instance.getComponent(
ShaderMaterialPrefab
).glowInner
material: Material = ShaderMaterialPrefab.instance.getComponent(ShaderMaterialPrefab).glowInner,
) {
showNode
.getComponents(UIRenderer)
.forEach((renderComponent: UIRenderer) => {
showNode.getComponents(UIRenderer).forEach((renderComponent: UIRenderer) => {
material.setProperty('glowColor', materialParam.glowColor)
material.setProperty('glowColorSize', materialParam.glowColorSize)
material.setProperty('glowThreshold', materialParam.glowThreshold)
renderComponent.setSharedMaterial(material, 0)
})
showNode.children.forEach((childNode) => {
childNode.getComponents(UIRenderer).forEach((renderComponent: UIRenderer) => {
material.setProperty('glowColor', materialParam.glowColor)
material.setProperty('glowColorSize', materialParam.glowColorSize)
material.setProperty('glowThreshold', materialParam.glowThreshold)
renderComponent.setSharedMaterial(material, 0)
renderComponent.setMaterial(material, 0)
})
showNode.children.forEach((childNode) => {
childNode
.getComponents(UIRenderer)
.forEach((renderComponent: UIRenderer) => {
material.setProperty('glowColor', materialParam.glowColor)
material.setProperty('glowColorSize', materialParam.glowColorSize)
material.setProperty('glowThreshold', materialParam.glowThreshold)
renderComponent.setMaterial(material, 0)
})
})
}
@@ -164,7 +138,7 @@ export default class ShaderHelper {
this.setGlowInner(showNode, {
glowColor: color,
glowColorSize: 0.015,
glowThreshold: 0.1
glowThreshold: 0.1,
})
}
@@ -173,29 +147,27 @@ export default class ShaderHelper {
*/
public static showFlash(showNode: Node, totalFlashTimes: number = 1) {
let timeCount: number = 0
let color: Color = Color.WHITE
const color: Color = Color.WHITE
let flashTimes: number = 0
let intervalId = setInterval(() => {
const intervalId = setInterval(() => {
timeCount += 1
if (timeCount % 50 == 0) {
let tempCount: number = timeCount / 50
if (tempCount % 2 == 0) {
if (timeCount % 50 === 0) {
const tempCount: number = timeCount / 50
if (tempCount % 2 === 0) {
color.a = 100
this.setGlowInner(showNode, {
glowColor: color,
glowColorSize: 0.1,
glowThreshold: 0
glowThreshold: 0,
})
} else {
flashTimes++
this.setGlowInner(showNode, {
glowColor: color,
glowColorSize: 0,
glowThreshold: 0
glowThreshold: 0,
})
if (flashTimes > totalFlashTimes) {
clearInterval(intervalId)
}
if (flashTimes > totalFlashTimes) clearInterval(intervalId)
}
}
}, 1)
@@ -210,25 +182,19 @@ export default class ShaderHelper {
public static setMosaic(
showNode: Node,
materialParam: any,
material: Material = ShaderMaterialPrefab.instance.getComponent(
ShaderMaterialPrefab
).mosaic
material: Material = ShaderMaterialPrefab.instance.getComponent(ShaderMaterialPrefab).mosaic,
) {
showNode
.getComponents(UIRenderer)
.forEach((renderComponent: UIRenderer) => {
showNode.getComponents(UIRenderer).forEach((renderComponent: UIRenderer) => {
material.setProperty('xBlockCount', materialParam.xBlockCount)
material.setProperty('yBlockCount', materialParam.yBlockCount)
renderComponent.setSharedMaterial(material, 0)
})
showNode.children.forEach((childNode) => {
childNode.getComponents(UIRenderer).forEach((renderComponent: UIRenderer) => {
material.setProperty('xBlockCount', materialParam.xBlockCount)
material.setProperty('yBlockCount', materialParam.yBlockCount)
renderComponent.setSharedMaterial(material, 0)
})
showNode.children.forEach((childNode) => {
childNode
.getComponents(UIRenderer)
.forEach((renderComponent: UIRenderer) => {
material.setProperty('xBlockCount', materialParam.xBlockCount)
material.setProperty('yBlockCount', materialParam.yBlockCount)
renderComponent.setSharedMaterial(material, 0)
})
})
}
@@ -237,17 +203,15 @@ export default class ShaderHelper {
*/
public static showMosaicMv(showNode: Node, callback: Function = null) {
let masaicTimes: number = 500
let intervalId = setInterval(() => {
const intervalId = setInterval(() => {
masaicTimes -= 2
this.setMosaic(showNode, {
xBlockCount: masaicTimes,
yBlockCount: masaicTimes
yBlockCount: masaicTimes,
})
if (masaicTimes <= 30) {
clearInterval(intervalId)
if (callback) {
callback()
}
if (callback) callback()
}
}, 1)
}
@@ -261,27 +225,22 @@ export default class ShaderHelper {
public static setRoundCornerCrop(
showNode: Node,
roundCornerRadius: number = 0.1,
material: Material = ShaderMaterialPrefab.instance.getComponent(
ShaderMaterialPrefab
).roundCornerCrop
material: Material = ShaderMaterialPrefab.instance.getComponent(ShaderMaterialPrefab)
.roundCornerCrop,
) {
showNode
.getComponents(UIRenderer)
.forEach((renderComponent: UIRenderer) => {
showNode.getComponents(UIRenderer).forEach((renderComponent: UIRenderer) => {
// material.setProperty("roundCornerRadius", roundCornerRadius);
material.setProperty('xRadius', roundCornerRadius)
material.setProperty('yRadius', roundCornerRadius)
renderComponent.setSharedMaterial(material, 0)
})
showNode.children.forEach((childNode) => {
childNode.getComponents(UIRenderer).forEach((renderComponent: UIRenderer) => {
// material.setProperty("roundCornerRadius", roundCornerRadius);
material.setProperty('xRadius', roundCornerRadius)
material.setProperty('yRadius', roundCornerRadius)
renderComponent.setSharedMaterial(material, 0)
})
showNode.children.forEach((childNode) => {
childNode
.getComponents(UIRenderer)
.forEach((renderComponent: UIRenderer) => {
// material.setProperty("roundCornerRadius", roundCornerRadius);
material.setProperty('xRadius', roundCornerRadius)
material.setProperty('yRadius', roundCornerRadius)
renderComponent.setSharedMaterial(material, 0)
})
})
}
@@ -304,33 +263,49 @@ export default class ShaderHelper {
enableGradient: boolean = true,
cropAlpha: boolean = true,
enableFog: boolean = false,
material: Material = ShaderMaterialPrefab.instance.getComponent(
ShaderMaterialPrefab
).flashLight
material: Material = ShaderMaterialPrefab.instance.getComponent(ShaderMaterialPrefab)
.flashLight,
) {
showNode
.getComponents(UIRenderer)
.forEach((renderComponent: UIRenderer) => {
// showNode.getComponents(UIRenderer).forEach((renderComponent: UIRenderer) => {
// material.setProperty('lightColor', lightColor)
// material.setProperty('lightWidth', lightWidth)
// material.setProperty('lightAngle', lightAngle)
// material.setProperty('enableGradient', enableGradient ? 1 : 0)
// material.setProperty('cropAlpha', cropAlpha ? 1 : 0)
// material.setProperty('enableFog', enableFog ? 1 : 0)
// renderComponent.setSharedMaterial(material, 0)
// })
// showNode.children.forEach((childNode) => {
// childNode.getComponents(UIRenderer).forEach((renderComponent: UIRenderer) => {
// material.setProperty('lightColor', lightColor)
// material.setProperty('lightWidth', lightWidth)
// material.setProperty('lightAngle', lightAngle)
// material.setProperty('enableGradient', enableGradient ? 1 : 0)
// material.setProperty('cropAlpha', cropAlpha ? 1 : 0)
// material.setProperty('enableFog', enableFog ? 1 : 0)
// renderComponent.setSharedMaterial(material, 0)
// })
// })
const setMaterialProperties = (renderer: UIRenderer) => {
try {
material.setProperty('lightColor', lightColor)
material.setProperty('lightWidth', lightWidth)
material.setProperty('lightAngle', lightAngle)
material.setProperty('enableGradient', enableGradient ? 1 : 0)
material.setProperty('cropAlpha', cropAlpha ? 1 : 0)
material.setProperty('enableFog', enableFog ? 1 : 0)
renderComponent.setSharedMaterial(material, 0)
})
showNode.children.forEach((childNode) => {
childNode
.getComponents(UIRenderer)
.forEach((renderComponent: UIRenderer) => {
material.setProperty('lightColor', lightColor)
material.setProperty('lightWidth', lightWidth)
material.setProperty('lightAngle', lightAngle)
material.setProperty('enableGradient', enableGradient ? 1 : 0)
material.setProperty('cropAlpha', cropAlpha ? 1 : 0)
material.setProperty('enableFog', enableFog ? 1 : 0)
renderComponent.setSharedMaterial(material, 0)
})
renderer.setSharedMaterial(material, 0)
} catch (error) {
console.error('Error setting material properties:', error)
}
}
const renderComponents = [
...showNode.getComponents(UIRenderer),
...showNode.children.flatMap(childNode => childNode.getComponents(UIRenderer)),
]
renderComponents.forEach((renderComponent: UIRenderer) => {
setMaterialProperties(renderComponent)
})
}
@@ -340,28 +315,23 @@ export default class ShaderHelper {
* @param callback
*/
public static showFlashLightMv(showNode: Node, callback: Function = null) {
let nowClor: Color = new Color(0, 0, 0, 255)
const nowClor: Color = new Color(0, 0, 0, 255)
let colorIndex: number = 0
let lightAngle: number = 0
let intervalId = setInterval(() => {
if (colorIndex == 0) {
const intervalId = setInterval(() => {
if (colorIndex === 0) {
nowClor.r = nowClor.r + 2
if (nowClor.r >= 255) {
colorIndex += 1
}
} else if (colorIndex == 1) {
if (nowClor.r >= 255) colorIndex += 1
} else if (colorIndex === 1) {
nowClor.g = nowClor.g + 2
if (nowClor.g >= 255) {
colorIndex += 1
}
if (nowClor.g >= 255) colorIndex += 1
} else {
nowClor.b = nowClor.b + 2
if (nowClor.b >= 255) {
clearInterval(intervalId)
ShaderHelper.clearAllEffect(showNode)
if (callback) {
callback()
}
if (callback) callback()
return
}
}
@@ -372,21 +342,15 @@ export default class ShaderHelper {
public static setFlag(
showNode: Node,
material: Material = ShaderMaterialPrefab.instance.getComponent(
ShaderMaterialPrefab
).flag
material: Material = ShaderMaterialPrefab.instance.getComponent(ShaderMaterialPrefab).flag,
) {
showNode
.getComponents(UIRenderer)
.forEach((renderComponent: UIRenderer) => {
showNode.getComponents(UIRenderer).forEach((renderComponent: UIRenderer) => {
renderComponent.setSharedMaterial(material, 0)
})
showNode.children.forEach((childNode) => {
childNode.getComponents(UIRenderer).forEach((renderComponent: UIRenderer) => {
renderComponent.setSharedMaterial(material, 0)
})
showNode.children.forEach((childNode) => {
childNode
.getComponents(UIRenderer)
.forEach((renderComponent: UIRenderer) => {
renderComponent.setSharedMaterial(material, 0)
})
})
}
@@ -397,32 +361,23 @@ export default class ShaderHelper {
*/
public static setGaussian(
showNode: Node,
material: Material = ShaderMaterialPrefab.instance.getComponent(
ShaderMaterialPrefab
).gaussian
material: Material = ShaderMaterialPrefab.instance.getComponent(ShaderMaterialPrefab).gaussian,
) {
showNode
.getComponents(UIRenderer)
.forEach((renderComponent: UIRenderer) => {
let tran = renderComponent.node.getComponent(UITransform)
showNode.getComponents(UIRenderer).forEach((renderComponent: UIRenderer) => {
const tran = renderComponent.node.getComponent(UITransform)
material.setProperty('textureSize', new Vec2(tran.contentSize.width, tran.contentSize.height))
renderComponent.setSharedMaterial(material, 0)
})
showNode.children.forEach((childNode) => {
childNode.getComponents(UIRenderer).forEach((renderComponent: UIRenderer) => {
const tran = renderComponent.node.getComponent(UITransform)
material.setProperty(
'textureSize',
new Vec2(tran.contentSize.width, tran.contentSize.height)
new Vec2(tran.contentSize.width, tran.contentSize.height),
)
renderComponent.setMaterial(material, 0)
// material.setProperty("textureSize", cc.v2(showNode.width, showNode.height));
renderComponent.setSharedMaterial(material, 0)
})
showNode.children.forEach((childNode) => {
childNode
.getComponents(UIRenderer)
.forEach((renderComponent: UIRenderer) => {
let tran = renderComponent.node.getComponent(UITransform)
material.setProperty(
'textureSize',
new Vec2(tran.contentSize.width, tran.contentSize.height)
)
// material.setProperty("textureSize", cc.v2(showNode.width, showNode.height));
renderComponent.setSharedMaterial(material, 0)
})
})
}
}

View File

@@ -1,5 +1,7 @@
import { sys } from 'cc'
import ManifestConfig from '../config/ManifestConfig'
import EventManager from './EventManager'
import HotUpdate from './HotUpdate'
@@ -8,7 +10,7 @@ export default class VersionManager {
public static Config_Game_Name: Array<string> = ['游戏大厅']
//热更文件下载来后存放文件夹
// 热更文件下载来后存放文件夹
public static Config_Key: Array<string> = ['main-remote-asset']
private static Config_ManifestName: string = 'project.manifest'
@@ -18,10 +20,10 @@ export default class VersionManager {
public iosStoreUrl: string = ''
public apkStoreUrl: string = ''
public nowVersion: string = ManifestConfig.version //网页显示版本号,如果是热更会替换改值
public nowVersion: string = ManifestConfig.version // 网页显示版本号,如果是热更会替换改值
public targetVersion: string = '1.0.0'
public isOpenHotUpdate: boolean = true //是否打开热更
public isOpenHotUpdate: boolean = true // 是否打开热更
private hotUpdateList: Array<HotUpdate> = []
@@ -33,27 +35,21 @@ export default class VersionManager {
public reInitAll() {
this.releaseAll()
for (let i = 0; i < VersionManager.Config_Key.length; i++) {
this.reInit(i)
}
for (let i = 0; i < VersionManager.Config_Key.length; i++) this.reInit(i)
}
public releaseAll() {
for (let i = 0; i < VersionManager.Config_Key.length; i++) {
if (this.hotUpdateList[i]) {
this.hotUpdateList[i].disposeUpdate()
}
}
for (let i = 0; i < VersionManager.Config_Key.length; i++)
if (this.hotUpdateList[i]) this.hotUpdateList[i].disposeUpdate()
}
public reInit(index: number) {
if (!this.hotUpdateList[index]) {
this.hotUpdateList[index] = new HotUpdate()
}
if (!this.hotUpdateList[index]) this.hotUpdateList[index] = new HotUpdate()
this.hotUpdateList[index].init(
index,
VersionManager.Config_Key[index],
VersionManager.Config_ManifestName
VersionManager.Config_ManifestName,
)
if (!this.isOpenHotUpdate) {
this.hotUpdateList[index].isCheck = true
@@ -63,15 +59,15 @@ export default class VersionManager {
public checkUpdate(keyIndex: number) {
if (keyIndex < this.hotUpdateList.length) {
let hotUpdate: HotUpdate = this.hotUpdateList[keyIndex]
const hotUpdate: HotUpdate = this.hotUpdateList[keyIndex]
if (sys.isNative) {
if (keyIndex == this.noUpdateIndex) {
//在大厅热更,不用子游戏热更了
if (keyIndex === this.noUpdateIndex) {
// 在大厅热更,不用子游戏热更了
hotUpdate.isCheck = true
hotUpdate.isFinishUpdate = true
EventManager.instance.dispatchEvent(
HotUpdate.Event_On_ALREADY_UP_TO_DATE,
VersionManager.Config_Key[keyIndex]
VersionManager.Config_Key[keyIndex],
)
} else {
hotUpdate.checkUpdate()
@@ -81,28 +77,27 @@ export default class VersionManager {
hotUpdate.isFinishUpdate = true
EventManager.instance.dispatchEvent(
HotUpdate.Event_On_ALREADY_UP_TO_DATE,
VersionManager.Config_Key[keyIndex]
VersionManager.Config_Key[keyIndex],
)
}
} else {
EventManager.instance.dispatchEvent(
HotUpdate.Event_On_ALREADY_UP_TO_DATE,
VersionManager.Config_Key[keyIndex]
VersionManager.Config_Key[keyIndex],
)
}
}
public startUpdate(keyIndex: number) {
let hotUpdate: HotUpdate = this.hotUpdateList[keyIndex]
const hotUpdate: HotUpdate = this.hotUpdateList[keyIndex]
hotUpdate.startUpdate()
}
public isCheck(keyIndex: number) {
if (keyIndex < this.hotUpdateList.length) {
let hotUpdate: HotUpdate = this.hotUpdateList[keyIndex]
if (keyIndex == this.noUpdateIndex) {
return true
}
const hotUpdate: HotUpdate = this.hotUpdateList[keyIndex]
if (keyIndex === this.noUpdateIndex) return true
return hotUpdate.isCheck
}
return true
@@ -110,10 +105,9 @@ export default class VersionManager {
public needUpdate(keyIndex: number) {
if (keyIndex < this.hotUpdateList.length) {
let hotUpdate: HotUpdate = this.hotUpdateList[keyIndex]
if (keyIndex == this.noUpdateIndex) {
return false
}
const hotUpdate: HotUpdate = this.hotUpdateList[keyIndex]
if (keyIndex === this.noUpdateIndex) return false
return hotUpdate.needUpdate
}
return false
@@ -121,7 +115,7 @@ export default class VersionManager {
public isUpdating(keyIndex: number) {
if (keyIndex < this.hotUpdateList.length) {
let hotUpdate: HotUpdate = this.hotUpdateList[keyIndex]
const hotUpdate: HotUpdate = this.hotUpdateList[keyIndex]
return hotUpdate.isUpdating
}
return false
@@ -129,10 +123,9 @@ export default class VersionManager {
public isFinishUpdate(keyIndex: number) {
if (keyIndex < this.hotUpdateList.length) {
let hotUpdate: HotUpdate = this.hotUpdateList[keyIndex]
if (keyIndex == this.noUpdateIndex) {
return true
}
const hotUpdate: HotUpdate = this.hotUpdateList[keyIndex]
if (keyIndex === this.noUpdateIndex) return true
return hotUpdate.isFinishUpdate
}
return true

View File

@@ -0,0 +1,6 @@
import { DEV } from 'cc/env'
export default {
url: () => (DEV ? 'https://fish.wanzhuanyongcheng.cn' : 'https://fish.jdt168.com'),
wsUrl: () => (DEV ? 'fish.wanzhuanyongcheng.cn' : 'fish.jdt168.com'),
}

View File

@@ -2,10 +2,8 @@
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "71a46444-1a80-435f-b02e-0fe6acf71155",
"uuid": "f01978bd-5d14-49a6-bea7-4b7ad0c82b7b",
"files": [],
"subMetas": {},
"userData": {
"simulateGlobals": []
}
"userData": {}
}

View File

@@ -1,44 +1,86 @@
import { FishInfo } from './FishInfo'
import config from './Config'
export class FishConfig {
public static readonly config: ReadonlyArray<FishInfo> = [
new FishInfo(1, '蝴蝶鱼', 2, 2),
new FishInfo(2, '鲶鱼', 2, 1),
new FishInfo(3, '狮子鱼', 2, 2),
new FishInfo(4, '条纹鱼', 2, 2),
new FishInfo(5, '沙丁鱼', 2, 2),
new FishInfo(6, '石斑鱼', 2, 2),
new FishInfo(7, '河豚', 3, 1.2),
new FishInfo(8, '海螺', 3, 2),
new FishInfo(9, '接吻鱼', 3, 1.2),
new FishInfo(10, '海姆', 4, 1),
new FishInfo(11, '绿鳍鱼', 4, 1.2),
new FishInfo(12, '鲎', 4, 1.2),
new FishInfo(13, '魔鬼鱼', 5, 0.6),
new FishInfo(14, '小海龟', 5, 2),
new FishInfo(15, '锤头鲨', 6, 0.5),
new FishInfo(16, '金枪鱼', 6, 0.5),
new FishInfo(17, '大三元', 6, 0.5),
new FishInfo(18, '黄金鲎', 6, 1.2),
new FishInfo(19, '大四喜', 7, 0.5),
new FishInfo(20, '黄金锤头鲨', 7, 0.5),
new FishInfo(21, '金海姆', 7, 0.6),
new FishInfo(22, '五福临门', 8, 0.4),
new FishInfo(23, '金海龟', 8, 0.7),
new FishInfo(24, '金鲨', 8, 0.5),
new FishInfo(25, '蓝鲨', 8, 0.5),
new FishInfo(26, '美人鱼', 14, 0.4),
new FishInfo(27, '金龙', 14, 0.3),
new FishInfo(28, '章鱼', 10, 0.5),
new FishInfo(29, '电鳗鱼', 3, 0.8)
public static config: Array<FishInfo> = [
// new FishInfo(1, '蝴蝶鱼', 2, 2),
// new FishInfo(2, '鲶鱼', 2, 1),
// new FishInfo(3, '狮子鱼', 2, 2),
// new FishInfo(4, '条纹鱼', 2, 2),
// new FishInfo(5, '沙丁鱼', 2, 2),
// new FishInfo(6, '石斑鱼', 2, 2),
// new FishInfo(7, '河豚', 3, 1.2),
// new FishInfo(8, '海螺', 3, 2),
// new FishInfo(9, '接吻鱼', 3, 1.2),
// new FishInfo(10, '海姆', 4, 1),
// new FishInfo(11, '绿鳍鱼', 4, 1.2),
// new FishInfo(12, '鲎', 4, 1.2),
// new FishInfo(13, '魔鬼鱼', 5, 0.6),
// new FishInfo(14, '小海龟', 5, 2),
// new FishInfo(15, '锤头鲨', 6, 0.5),
// new FishInfo(16, '金枪鱼', 6, 0.5),
// new FishInfo(17, '大三元', 6, 0.5),
// new FishInfo(18, '黄金鲎', 6, 1.2),
// new FishInfo(19, '大四喜', 7, 0.5),
// new FishInfo(20, '黄金锤头鲨', 7, 0.5),
// new FishInfo(21, '金海姆', 7, 0.6),
// new FishInfo(22, '五福临门', 8, 0.4),
// new FishInfo(23, '金海龟', 8, 0.7),
// new FishInfo(24, '金鲨', 8, 0.5),
// new FishInfo(25, '蓝鲨', 8, 0.5),
// new FishInfo(26, '美人鱼', 14, 0.4),
// new FishInfo(27, '金龙', 14, 0.3),
// new FishInfo(28, '章鱼', 10, 0.5),
// new FishInfo(29, '电鳗鱼', 3, 0.8),
// new FishInfo(1, '蝴蝶鱼'),
// new FishInfo(2, '鲶鱼'),
// new FishInfo(3, '狮子鱼'),
// new FishInfo(4, '条纹鱼'),
// new FishInfo(5, '沙丁鱼'),
// new FishInfo(6, '石斑鱼'),
// new FishInfo(7, '河豚'),
// new FishInfo(8, '海螺'),
// new FishInfo(9, '接吻鱼'),
// new FishInfo(10, '海姆'),
// new FishInfo(11, '绿鳍鱼'),
// new FishInfo(12, '鲎'),
// new FishInfo(13, '魔鬼鱼'),
// new FishInfo(14, '小海龟'),
// new FishInfo(15, '锤头鲨'),
// new FishInfo(16, '金枪鱼'),
// new FishInfo(17, '大三元'),
// new FishInfo(18, '黄金鲎'),
// new FishInfo(19, '大四喜'),
// new FishInfo(20, '黄金锤头鲨'),
// new FishInfo(21, '金海姆'),
// new FishInfo(22, '五福临门'),
// new FishInfo(23, '金海龟'),
// new FishInfo(24, '金鲨'),
// new FishInfo(25, '蓝鲨'),
// new FishInfo(26, '美人鱼'),
// new FishInfo(27, '金龙'),
// new FishInfo(28, '章鱼'),
// new FishInfo(29, '电鳗鱼'),
]
public static async init() {
this.config = []
return new Promise<boolean>((resolve) => {
fetch(`${config.url()}/fish/list`)
.then((response) => response.text())
.then((response) => {
const { data: res } = JSON.parse(response)
res.data.forEach((item) => {
this.config.push(new FishInfo(item.ID, item.name, item.health))
})
resolve(true)
})
})
}
public static getFishInfoByType(fishType: number) {
for (let i = 0; i < this.config.length; i++) {
let fishInfo: FishInfo = this.config[i]
if (fishInfo.fishType == fishType) {
return fishInfo
}
const fishInfo: FishInfo = this.config[i]
if (fishInfo.fishType === fishType) return fishInfo
}
}
}

View File

@@ -2,17 +2,17 @@ export class FishInfo {
public fishType: number
public name: string
public blood: number
public wikiScale: number
// public wikiScale: number
constructor(
fishType: number,
name: string,
blood: number,
wikiScale: number
// wikiScale: number,
) {
this.fishType = fishType
this.name = name
this.blood = blood
this.wikiScale = wikiScale
// this.wikiScale = wikiScale
}
}

View File

@@ -1,17 +1,11 @@
export class FishMapInfo {
public fishType: number
public scale: number
public side: number //1: -1:
public side: number // 1: -1:
public x: number
public y: number
constructor(
fishType: number,
scale: number,
side: number,
x: number,
y: number
) {
constructor(fishType: number, scale: number, side: number, x: number, y: number) {
this.fishType = fishType
this.scale = scale
this.side = side

View File

@@ -1,8 +1,10 @@
import { Vec2 } from 'cc'
import { FishPathInfo } from './FishPathInfo'
import RandomUtil from '../../engine/utils/RandomUtil'
import { FishMapInfo } from './FishMapInfo'
import { FishMap } from './FishMap'
import { FishMapInfo } from './FishMapInfo'
import { FishPathInfo } from './FishPathInfo'
export class FishPathConfig {
private static mapConfig: Array<Array<Array<number>>> = [
@@ -90,7 +92,7 @@ export class FishPathConfig {
[1, 1, 1, 754, -7],
[1, 1, 1, 671, 26],
[1, 1, 1, 630, 59],
[1, 1, 1, 584, 80]
[1, 1, 1, 584, 80],
],
[
[2, 1, 1, -784, 353],
@@ -135,7 +137,7 @@ export class FishPathConfig {
[3, 1, 1, 523, -253],
[3, 1, 1, 172, 128],
[3, 1, 1, -357, 30],
[3, 1, 1, 582, 23]
[3, 1, 1, 582, 23],
],
[
[5, 1, 1, -888, 405],
@@ -191,7 +193,7 @@ export class FishPathConfig {
[7, 1, 1, 340, -259],
[7, 1, 1, 485, -254],
[7, 1, 1, 622, -254],
[7, 1, 1, 816, -251]
[7, 1, 1, 816, -251],
],
[
[9, 1, 1, -513, 150],
@@ -222,7 +224,7 @@ export class FishPathConfig {
[9, 1, 1, 865, 195],
[9, 1, 1, 665, 207],
[17, 1, 1, -461, 2],
[17, 1, 1, 515, -49]
[17, 1, 1, 515, -49],
],
[
[19, 1, 1, -785, 31],
@@ -234,7 +236,7 @@ export class FishPathConfig {
[20, 1, 1, 425, -301],
[20, 1, 1, 537, 265],
[20, 1, 1, -604, 317],
[20, 1, 1, -634, -285]
[20, 1, 1, -634, -285],
],
[
[21, 1, 1, -757, 94],
@@ -245,12 +247,12 @@ export class FishPathConfig {
[21, 1, 1, -437, 300],
[21, 1, 1, -434, -155],
[21, 1, 1, 314, -154],
[21, 1, 1, 435, 249]
[21, 1, 1, 435, 249],
],
[
[22, 1, 1, -548, 65],
[22, 1, 1, 747, 61],
[22, 1, 1, 95, 63]
[22, 1, 1, 95, 63],
],
[
[23, 1, 1, -431, 384],
@@ -262,7 +264,7 @@ export class FishPathConfig {
[23, 1, 1, 1025, 60],
[23, 1, 1, 677, -247],
[23, 1, 1, 104, 390],
[23, 1, 1, 84, -265]
[23, 1, 1, 84, -265],
],
[
[24, 1, 1, -429, 353],
@@ -271,7 +273,7 @@ export class FishPathConfig {
[24, 1, 1, -27, 35],
[24, 1, 1, 563, 39],
[24, 1, 1, -268, -245],
[24, 1, 1, 172, -260]
[24, 1, 1, 172, -260],
],
[
[25, 1, 1, -595, 276],
@@ -279,27 +281,27 @@ export class FishPathConfig {
[25, 1, 1, -192, -64],
[25, 1, 1, 464, -46],
[25, 1, 1, 191, -280],
[25, 1, 1, 884, -319]
[25, 1, 1, 884, -319],
],
[
[26, 1, 1, -681, 441],
[26, 1, 1, 685, 426],
[26, 1, 1, -46, 140],
[26, 1, 1, -494, -207],
[26, 1, 1, 497, -238]
[26, 1, 1, 497, -238],
],
[
[27, 1, 1, -431, 345],
[27, 1, 1, 569, 311],
[27, 1, 1, 112, -12],
[27, 1, 1, -298, -271],
[27, 1, 1, 678, -244]
[27, 1, 1, 678, -244],
],
[
[28, 1, 1, -454, 8],
[28, 1, 1, 597, 1],
[28, 1, 1, 46, 431],
[28, 1, 1, 44, -227]
[28, 1, 1, 44, -227],
],
[
[2, 1, 1, -557, 409],
@@ -345,9 +347,10 @@ export class FishPathConfig {
[5, 1, 1, 407, -178],
[5, 1, 1, 297, 8],
[5, 1, 1, 625, 48],
[5, 1, 1, 379, 92]
]
[5, 1, 1, 379, 92],
],
]
private static formatMapConfig: Array<FishMap> = []
private static config: Array<Array<Array<number>>> = [
// 左边开始
@@ -368,7 +371,7 @@ export class FishPathConfig {
[627, -511],
[762, -578],
[885, -667],
[1068, -773]
[1068, -773],
],
[
[-1295, 534],
@@ -385,7 +388,7 @@ export class FishPathConfig {
[753, 233],
[936, 279],
[1182, 350],
[1314, 418]
[1314, 418],
],
[
[-1295, 534],
@@ -402,7 +405,7 @@ export class FishPathConfig {
[827, -42],
[1020, -131],
[1189, -170],
[1309, -198]
[1309, -198],
],
[
[-1295, 534],
@@ -419,7 +422,7 @@ export class FishPathConfig {
[835, 88],
[1013, -2],
[1212, -99],
[1309, -198]
[1309, -198],
],
[
[-1275, -118],
@@ -436,7 +439,7 @@ export class FishPathConfig {
[772, 391],
[887, 426],
[1066, 513],
[1164, 710]
[1164, 710],
],
[
[-1299, -618],
@@ -453,7 +456,7 @@ export class FishPathConfig {
[904, 176],
[1090, 273],
[1208, 355],
[1308, 435]
[1308, 435],
],
[
[-1275, -118],
@@ -470,7 +473,7 @@ export class FishPathConfig {
[784, 266],
[935, 228],
[1157, 174],
[1329, 163]
[1329, 163],
],
[
[-1288, -220],
@@ -487,7 +490,7 @@ export class FishPathConfig {
[851, 203],
[1050, 141],
[1255, 58],
[1326, 20]
[1326, 20],
],
[
[-1288, -220],
@@ -504,7 +507,7 @@ export class FishPathConfig {
[993, -283],
[1090, -319],
[1242, -341],
[1329, -396]
[1329, -396],
],
[
[-1288, -220],
@@ -521,7 +524,7 @@ export class FishPathConfig {
[1011, -407],
[1095, -418],
[1238, -539],
[1317, -663]
[1317, -663],
],
[
[-1314, -508],
@@ -540,7 +543,7 @@ export class FishPathConfig {
[1093, 280],
[1026, 371],
[868, 631],
[648, 787]
[648, 787],
],
[
[-1314, -508],
@@ -559,7 +562,7 @@ export class FishPathConfig {
[1093, 280],
[1026, 371],
[868, 631],
[648, 787]
[648, 787],
],
[
[-1314, -508],
@@ -576,9 +579,9 @@ export class FishPathConfig {
[872, -200],
[1060, -391],
[1150, -492],
[1301, -461]
[1301, -461],
],
//右边开始
// 右边开始
[
[1286, -293],
[1149, -184],
@@ -588,7 +591,7 @@ export class FishPathConfig {
[476, 57],
[467, 300],
[408, 500],
[405, 701]
[405, 701],
],
[
[1345, 34],
@@ -599,7 +602,7 @@ export class FishPathConfig {
[267, -29],
[66, -79],
[-219, -287],
[-271, -693]
[-271, -693],
],
[
[1345, 34],
@@ -614,7 +617,7 @@ export class FishPathConfig {
[-725, -92],
[-963, -68],
[-1169, -46],
[-1325, -40]
[-1325, -40],
],
[
[1345, 34],
@@ -629,7 +632,7 @@ export class FishPathConfig {
[-719, -199],
[-981, -264],
[-1180, -291],
[-1320, -367]
[-1320, -367],
],
[
[1345, 34],
@@ -644,7 +647,7 @@ export class FishPathConfig {
[-707, -320],
[-961, -408],
[-1160, -449],
[-1309, -524]
[-1309, -524],
],
[
[1345, 34],
@@ -659,7 +662,7 @@ export class FishPathConfig {
[-596, -448],
[-847, -604],
[-1019, -589],
[-1241, -695]
[-1241, -695],
],
[
[1345, 34],
@@ -674,7 +677,7 @@ export class FishPathConfig {
[-898, 66],
[-1070, 219],
[-1181, 292],
[-1289, 558]
[-1289, 558],
],
[
[1345, 34],
@@ -689,7 +692,7 @@ export class FishPathConfig {
[-806, 84],
[-905, 246],
[-1008, 375],
[-1021, 750]
[-1021, 750],
],
[
[1297, 542],
@@ -704,7 +707,7 @@ export class FishPathConfig {
[-806, 84],
[-905, 246],
[-1008, 375],
[-1021, 750]
[-1021, 750],
],
[
[1297, 542],
@@ -719,7 +722,7 @@ export class FishPathConfig {
[-806, 84],
[-927, 189],
[-1073, 291],
[-1318, 474]
[-1318, 474],
],
[
[1297, 542],
@@ -734,7 +737,7 @@ export class FishPathConfig {
[-775, -77],
[-923, -28],
[-1133, -46],
[-1294, -10]
[-1294, -10],
],
[
[1297, 542],
@@ -749,7 +752,7 @@ export class FishPathConfig {
[-616, -254],
[-854, -240],
[-1115, -272],
[-1312, -336]
[-1312, -336],
],
[
[1297, 542],
@@ -764,7 +767,7 @@ export class FishPathConfig {
[-562, -321],
[-647, -446],
[-930, -540],
[-1073, -726]
[-1073, -726],
],
[
[1293, -558],
@@ -779,7 +782,7 @@ export class FishPathConfig {
[-562, -321],
[-647, -446],
[-930, -540],
[-1073, -726]
[-1073, -726],
],
[
[1293, -558],
@@ -794,7 +797,7 @@ export class FishPathConfig {
[-568, -262],
[-857, -301],
[-1055, -406],
[-1353, -380]
[-1353, -380],
],
[
[1293, -558],
@@ -809,7 +812,7 @@ export class FishPathConfig {
[-590, -195],
[-905, -120],
[-1100, -72],
[-1300, 225]
[-1300, 225],
],
[
[1293, -558],
@@ -824,7 +827,7 @@ export class FishPathConfig {
[-633, -130],
[-917, 33],
[-1079, 184],
[-1220, 412]
[-1220, 412],
],
[
[1293, -558],
@@ -839,9 +842,9 @@ export class FishPathConfig {
[-602, -25],
[-857, 181],
[-921, 416],
[-909, 805]
[-909, 805],
],
//下往上
// 下往上
[
[-279, -786],
[-92, -667],
@@ -855,7 +858,7 @@ export class FishPathConfig {
[-602, -25],
[-857, 181],
[-921, 416],
[-909, 805]
[-909, 805],
],
[
[-279, -786],
@@ -870,7 +873,7 @@ export class FishPathConfig {
[-362, 152],
[-543, 358],
[-721, 502],
[-401, 770]
[-401, 770],
],
[
[-279, -786],
@@ -885,7 +888,7 @@ export class FishPathConfig {
[60, 214],
[-85, 418],
[-140, 630],
[-401, 770]
[-401, 770],
],
[
[-279, -786],
@@ -900,7 +903,7 @@ export class FishPathConfig {
[253, 319],
[330, 465],
[544, 684],
[858, 803]
[858, 803],
],
[
[841, -837],
@@ -915,9 +918,10 @@ export class FishPathConfig {
[253, 319],
[330, 465],
[544, 684],
[858, 803]
]
[858, 803],
],
]
private static formatConfig: Array<FishPathInfo> = []
public static init() {
@@ -928,70 +932,60 @@ export class FishPathConfig {
private static initMapConfig() {
this.formatMapConfig = []
for (let i = 0; i < this.mapConfig.length; i++) {
let arr: Array<Array<number>> = this.mapConfig[i]
let fishMapInfoList: Array<FishMapInfo> = []
const arr: Array<Array<number>> = this.mapConfig[i]
const fishMapInfoList: Array<FishMapInfo> = []
for (let j = 0; j < arr.length; j++) {
let temp: Array<number> = arr[j]
let fishMapInfo: FishMapInfo = new FishMapInfo(
const temp: Array<number> = arr[j]
const fishMapInfo: FishMapInfo = new FishMapInfo(
temp[0],
temp[1],
temp[2],
temp[3],
temp[4]
temp[4],
)
fishMapInfoList.push(fishMapInfo)
}
let fishMap: FishMap = new FishMap(i, fishMapInfoList)
const fishMap: FishMap = new FishMap(i, fishMapInfoList)
this.formatMapConfig.push(fishMap)
// console.log('this.formatMapConfig ', this.formatMapConfig)
}
}
public static randomFishMap() {
let randomIndex: number = RandomUtil.nextInt(
0,
this.formatMapConfig.length - 1
)
let map: FishMap = this.formatMapConfig[randomIndex]
return map
const randomIndex: number = RandomUtil.nextInt(0, this.formatMapConfig.length - 1)
return this.formatMapConfig[randomIndex]
}
private static initNormalConfig() {
this.formatConfig = []
let pathId: number = 1
for (let i = 0; i < this.config.length; i++) {
let path: Array<Vec2> = []
let flipXPath: Array<Vec2> = []
let flipYPath: Array<Vec2> = []
const path: Array<Vec2> = []
const flipXPath: Array<Vec2> = []
const flipYPath: Array<Vec2> = []
for (let j = 0; j < this.config[i].length; j++) {
let p: Vec2 = new Vec2(this.config[i][j][0], this.config[i][j][1])
const p: Vec2 = new Vec2(this.config[i][j][0], this.config[i][j][1])
path.push(p)
let flipXP: Vec2 = new Vec2(-p.x, p.y)
let flipYP: Vec2 = new Vec2(p.x, -p.y)
const flipXP: Vec2 = new Vec2(-p.x, p.y)
const flipYP: Vec2 = new Vec2(p.x, -p.y)
flipXPath.push(flipXP)
flipYPath.push(flipYP)
}
this.formatConfig.push(new FishPathInfo(pathId++, path))
this.formatConfig.push(new FishPathInfo(pathId++, flipXPath))
this.formatConfig.push(new FishPathInfo(pathId++, flipYPath))
this.formatConfig.push(new FishPathInfo(pathId, path))
this.formatConfig.push(new FishPathInfo(pathId, flipXPath))
this.formatConfig.push(new FishPathInfo(pathId, flipYPath))
}
}
public static getPathInfo(pathId: number) {
for (let i = 0; i < this.formatConfig.length; i++) {
let pathInfo: FishPathInfo = this.formatConfig[i]
if (pathInfo.pathId == pathId) {
return pathInfo
}
const pathInfo: FishPathInfo = this.formatConfig[i]
if (pathInfo.pathId === pathId) return pathInfo
}
}
public static randomPathInfo() {
let randomIndex: number = RandomUtil.nextInt(
0,
this.formatConfig.length - 1
)
// let randomIndex: number = 0
let pathInfo: FishPathInfo = this.formatConfig[randomIndex]
return pathInfo
const randomIndex: number = RandomUtil.nextInt(0, this.formatConfig.length - 1)
return this.formatConfig[randomIndex]
}
}

View File

@@ -1,10 +1,10 @@
import { Vec2 } from 'cc'
export class FishPathInfo {
public pathId: number
public pathId: string
public path: Array<Vec2> = []
constructor(pathId: number, path: Array<Vec2>) {
constructor(pathId: string, path: Array<Vec2>) {
this.pathId = pathId
this.path = path
}

Some files were not shown because too many files have changed in this diff Show More