diff --git a/assets/scenes/main.scene b/assets/scenes/main.scene index 598bf0c..5f00ccb 100644 --- a/assets/scenes/main.scene +++ b/assets/scenes/main.scene @@ -52,7 +52,7 @@ }, "autoReleaseAssets": false, "_globals": { - "__id__": 181 + "__id__": 204 }, "_id": "58132e64-0171-4c7f-89be-a2984ca7de6b" }, @@ -75,40 +75,40 @@ "__id__": 43 }, { - "__id__": 63 + "__id__": 56 }, { - "__id__": 66 + "__id__": 59 }, { - "__id__": 80 + "__id__": 73 }, { - "__id__": 89 + "__id__": 82 }, { - "__id__": 98 + "__id__": 91 }, { - "__id__": 107 + "__id__": 100 }, { - "__id__": 116 + "__id__": 109 }, { - "__id__": 125 + "__id__": 118 }, { - "__id__": 134 + "__id__": 127 }, { - "__id__": 143 + "__id__": 136 }, { - "__id__": 152 + "__id__": 145 }, { - "__id__": 161 + "__id__": 154 }, { "__id__": 6 @@ -117,28 +117,61 @@ "__id__": 47 }, { - "__id__": 61 + "__id__": 51 }, { - "__id__": 170 + "__id__": 54 }, { - "__id__": 172 + "__id__": 163 }, { - "__id__": 175 + "__id__": 165 + }, + { + "__id__": 168 + }, + { + "__id__": 171 + }, + { + "__id__": 174 + }, + { + "__id__": 177 + }, + { + "__id__": 180 + }, + { + "__id__": 183 + }, + { + "__id__": 186 + }, + { + "__id__": 189 + }, + { + "__id__": 192 + }, + { + "__id__": 195 + }, + { + "__id__": 198 } ], "_active": true, "_components": [ { - "__id__": 179 + "__id__": 202 }, { "__id__": 46 }, { - "__id__": 180 + "__id__": 203 } ], "_prefab": null, @@ -288,6 +321,8 @@ "smoothness": 0.1, "mapWidth": 1080, "mapHeight": 1920, + "initialFocusNodeName": "guai_10", + "initialFocusDuration": 2, "_id": "f3ED2JS1JKurfMG53fWzmg" }, { @@ -330,8 +365,8 @@ "_prefab": null, "_lpos": { "__type__": "cc.Vec3", - "x": -122.544, - "y": -705.63, + "x": -44.282, + "y": -755.631, "z": 0 }, "_lrot": { @@ -1734,6 +1769,9 @@ "bonus": { "__id__": 47 }, + "bonusWuqi": { + "__id__": 51 + }, "camera": { "__id__": 4 }, @@ -1741,7 +1779,7 @@ "__id__": 42 }, "attackAudio": { - "__id__": 61 + "__id__": 54 }, "moveSpeed": 300, "mapWidth": 1080, @@ -1772,70 +1810,12 @@ "_parent": { "__id__": 2 }, - "_children": [ - { - "__id__": 48 - }, - { - "__id__": 51 - }, - { - "__id__": 55 - } - ], - "_active": false, - "_components": [ - { - "__id__": 58 - }, - { - "__id__": 59 - }, - { - "__id__": 60 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 5.684341886080802e-14, - "y": 1.1368683772161603e-13, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 0.632, - "y": 0.632, - "z": 0.632 - }, - "_mobility": 0, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "27LXfenohMBb7sdZ6QiNFj" - }, - { - "__type__": "cc.Node", - "_name": "BonusWuqi", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 47 - }, "_children": [], "_active": false, "_components": [ + { + "__id__": 48 + }, { "__id__": 49 }, @@ -1846,8 +1826,8 @@ "_prefab": null, "_lpos": { "__type__": "cc.Vec3", - "x": -1.1368683772161603e-13, - "y": -2.2737367544323206e-13, + "x": 11.748, + "y": -197.824, "z": 0 }, "_lrot": { @@ -1859,9 +1839,141 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 2.367, - "y": 2.367, - "z": 2.367 + "x": 0.8, + "y": 0.8, + "z": 0.267336 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "4aK2e7KY5DUIHmLgjlO0jh" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 47 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 650, + "height": 915 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "78N2M7YsdEIZ1jNzcEyht+" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 47 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "ef0a4723-ab8e-481f-9567-e9b2a1400181@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "e64Xg5V7BPw7LzMLBUVqzL" + }, + { + "__type__": "cc.Animation", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 47 + }, + "_enabled": true, + "__prefab": null, + "playOnLoad": true, + "_clips": [ + { + "__uuid__": "e22ce611-db61-41a0-a1ac-f568696a8b26", + "__expectedType__": "cc.AnimationClip" + } + ], + "_defaultClip": { + "__uuid__": "e22ce611-db61-41a0-a1ac-f568696a8b26", + "__expectedType__": "cc.AnimationClip" + }, + "_id": "9c331h/W9OfbUVO863HUta" + }, + { + "__type__": "cc.Node", + "_name": "BonusWuqi", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 52 + }, + { + "__id__": 53 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 11.74799999999999, + "y": -197.824, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 0.9999999999999999, + "y": 0.9999999999999999, + "z": 1.9029520000000002 }, "_mobility": 0, "_layer": 33554432, @@ -1879,7 +1991,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 48 + "__id__": 51 }, "_enabled": true, "__prefab": null, @@ -1901,7 +2013,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 48 + "__id__": 51 }, "_enabled": true, "__prefab": null, @@ -1921,7 +2033,7 @@ }, "_type": 0, "_fillType": 0, - "_sizeMode": 1, + "_sizeMode": 0, "_fillCenter": { "__type__": "cc.Vec2", "x": 0, @@ -1934,345 +2046,6 @@ "_atlas": null, "_id": "25m0zgmgJNBJjvJHAtSkq0" }, - { - "__type__": "cc.Node", - "_name": "BonusAnim", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 47 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 52 - }, - { - "__id__": 53 - }, - { - "__id__": 54 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 5.684341886080802e-14, - "y": 1.1368683772161603e-13, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 0.632 - }, - "_mobility": 0, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "4aK2e7KY5DUIHmLgjlO0jh" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 51 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 679, - "height": 915 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "78N2M7YsdEIZ1jNzcEyht+" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 51 - }, - "_enabled": true, - "__prefab": null, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "ef0a4723-ab8e-481f-9567-e9b2a1400181@f9941", - "__expectedType__": "cc.SpriteFrame" - }, - "_type": 0, - "_fillType": 0, - "_sizeMode": 1, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": false, - "_atlas": null, - "_id": "e64Xg5V7BPw7LzMLBUVqzL" - }, - { - "__type__": "cc.Animation", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 51 - }, - "_enabled": true, - "__prefab": null, - "playOnLoad": true, - "_clips": [ - { - "__uuid__": "e22ce611-db61-41a0-a1ac-f568696a8b26", - "__expectedType__": "cc.AnimationClip" - } - ], - "_defaultClip": { - "__uuid__": "e22ce611-db61-41a0-a1ac-f568696a8b26", - "__expectedType__": "cc.AnimationClip" - }, - "_id": "9c331h/W9OfbUVO863HUta" - }, - { - "__type__": "cc.Node", - "_name": "Receive", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 47 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 56 - }, - { - "__id__": 57 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": -21.138, - "y": -391.06, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "a2yUBF0eFJmpeT8QlDf8IR" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 55 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 300, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "c6UjN/7EtGKaT6dndLkqcx" - }, - { - "__type__": "cc.Button", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 55 - }, - "_enabled": true, - "__prefab": null, - "clickEvents": [], - "_interactable": true, - "_transition": 0, - "_normalColor": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_hoverColor": { - "__type__": "cc.Color", - "r": 211, - "g": 211, - "b": 211, - "a": 255 - }, - "_pressedColor": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_disabledColor": { - "__type__": "cc.Color", - "r": 124, - "g": 124, - "b": 124, - "a": 255 - }, - "_normalSprite": null, - "_hoverSprite": null, - "_pressedSprite": null, - "_disabledSprite": null, - "_duration": 0.1, - "_zoomScale": 1.2, - "_target": null, - "_id": "08k0TOrZdEYZ4Cqya0AsWE" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 47 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 679, - "height": 915 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "8dGM5RXv5ORqUPj/99o4Vh" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 47 - }, - "_enabled": false, - "__prefab": null, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "ef0a4723-ab8e-481f-9567-e9b2a1400181@f9941", - "__expectedType__": "cc.SpriteFrame" - }, - "_type": 0, - "_fillType": 0, - "_sizeMode": 1, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": false, - "_atlas": null, - "_id": "51pBvNDH9LH7FNkPbRChYG" - }, - { - "__type__": "cc.Animation", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 47 - }, - "_enabled": false, - "__prefab": null, - "playOnLoad": true, - "_clips": [ - { - "__uuid__": "e22ce611-db61-41a0-a1ac-f568696a8b26", - "__expectedType__": "cc.AnimationClip" - } - ], - "_defaultClip": { - "__uuid__": "e22ce611-db61-41a0-a1ac-f568696a8b26", - "__expectedType__": "cc.AnimationClip" - }, - "_id": "408YjvgAlCYa++sWtnP/m4" - }, { "__type__": "cc.Node", "_name": "Attack", @@ -2285,7 +2058,7 @@ "_active": true, "_components": [ { - "__id__": 62 + "__id__": 55 } ], "_prefab": null, @@ -2324,7 +2097,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 61 + "__id__": 54 }, "_enabled": true, "__prefab": null, @@ -2349,10 +2122,10 @@ "_active": true, "_components": [ { - "__id__": 64 + "__id__": 57 }, { - "__id__": 65 + "__id__": 58 } ], "_prefab": null, @@ -2391,7 +2164,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 63 + "__id__": 56 }, "_enabled": true, "__prefab": null, @@ -2413,7 +2186,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 63 + "__id__": 56 }, "_enabled": true, "__prefab": null, @@ -2435,22 +2208,22 @@ }, "_children": [ { - "__id__": 67 + "__id__": 60 }, { - "__id__": 70 + "__id__": 63 }, { - "__id__": 73 + "__id__": 66 }, { - "__id__": 76 + "__id__": 69 } ], "_active": true, "_components": [ { - "__id__": 79 + "__id__": 72 } ], "_prefab": null, @@ -2489,16 +2262,16 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 66 + "__id__": 59 }, "_children": [], "_active": true, "_components": [ { - "__id__": 68 + "__id__": 61 }, { - "__id__": 69 + "__id__": 62 } ], "_prefab": null, @@ -2537,7 +2310,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 67 + "__id__": 60 }, "_enabled": true, "__prefab": null, @@ -2559,7 +2332,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 67 + "__id__": 60 }, "_enabled": true, "__prefab": null, @@ -2598,16 +2371,16 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 66 + "__id__": 59 }, "_children": [], "_active": true, "_components": [ { - "__id__": 71 + "__id__": 64 }, { - "__id__": 72 + "__id__": 65 } ], "_prefab": null, @@ -2646,7 +2419,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 70 + "__id__": 63 }, "_enabled": true, "__prefab": null, @@ -2668,7 +2441,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 70 + "__id__": 63 }, "_enabled": true, "__prefab": null, @@ -2707,16 +2480,16 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 66 + "__id__": 59 }, "_children": [], "_active": true, "_components": [ { - "__id__": 74 + "__id__": 67 }, { - "__id__": 75 + "__id__": 68 } ], "_prefab": null, @@ -2755,7 +2528,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 73 + "__id__": 66 }, "_enabled": true, "__prefab": null, @@ -2777,7 +2550,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 73 + "__id__": 66 }, "_enabled": true, "__prefab": null, @@ -2816,16 +2589,16 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 66 + "__id__": 59 }, "_children": [], "_active": true, "_components": [ { - "__id__": 77 + "__id__": 70 }, { - "__id__": 78 + "__id__": 71 } ], "_prefab": null, @@ -2864,7 +2637,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 76 + "__id__": 69 }, "_enabled": true, "__prefab": null, @@ -2886,7 +2659,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 76 + "__id__": 69 }, "_enabled": true, "__prefab": null, @@ -2925,7 +2698,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 66 + "__id__": 59 }, "_enabled": true, "__prefab": null, @@ -2951,25 +2724,25 @@ }, "_children": [ { - "__id__": 81 + "__id__": 74 } ], "_active": true, "_components": [ { - "__id__": 84 + "__id__": 77 }, { - "__id__": 85 + "__id__": 78 }, { - "__id__": 86 + "__id__": 79 }, { - "__id__": 87 + "__id__": 80 }, { - "__id__": 88 + "__id__": 81 } ], "_prefab": null, @@ -3008,16 +2781,16 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 80 + "__id__": 73 }, "_children": [], "_active": true, "_components": [ { - "__id__": 82 + "__id__": 75 }, { - "__id__": 83 + "__id__": 76 } ], "_prefab": null, @@ -3056,7 +2829,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 81 + "__id__": 74 }, "_enabled": true, "__prefab": null, @@ -3078,7 +2851,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 81 + "__id__": 74 }, "_enabled": true, "__prefab": null, @@ -3140,7 +2913,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 80 + "__id__": 73 }, "_enabled": true, "__prefab": null, @@ -3162,7 +2935,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 80 + "__id__": 73 }, "_enabled": true, "__prefab": null, @@ -3201,7 +2974,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 80 + "__id__": 73 }, "_enabled": true, "__prefab": null, @@ -3232,7 +3005,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 80 + "__id__": 73 }, "_enabled": true, "__prefab": null, @@ -3260,7 +3033,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 80 + "__id__": 73 }, "_enabled": true, "__prefab": null, @@ -3292,25 +3065,25 @@ }, "_children": [ { - "__id__": 90 + "__id__": 83 } ], "_active": true, "_components": [ { - "__id__": 93 + "__id__": 86 }, { - "__id__": 94 + "__id__": 87 }, { - "__id__": 95 + "__id__": 88 }, { - "__id__": 96 + "__id__": 89 }, { - "__id__": 97 + "__id__": 90 } ], "_prefab": null, @@ -3349,16 +3122,16 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 89 + "__id__": 82 }, "_children": [], "_active": true, "_components": [ { - "__id__": 91 + "__id__": 84 }, { - "__id__": 92 + "__id__": 85 } ], "_prefab": null, @@ -3397,7 +3170,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 90 + "__id__": 83 }, "_enabled": true, "__prefab": null, @@ -3419,7 +3192,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 90 + "__id__": 83 }, "_enabled": true, "__prefab": null, @@ -3481,7 +3254,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 89 + "__id__": 82 }, "_enabled": true, "__prefab": null, @@ -3503,7 +3276,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 89 + "__id__": 82 }, "_enabled": true, "__prefab": null, @@ -3542,7 +3315,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 89 + "__id__": 82 }, "_enabled": true, "__prefab": null, @@ -3573,7 +3346,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 89 + "__id__": 82 }, "_enabled": true, "__prefab": null, @@ -3601,7 +3374,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 89 + "__id__": 82 }, "_enabled": true, "__prefab": null, @@ -3633,25 +3406,25 @@ }, "_children": [ { - "__id__": 99 + "__id__": 92 } ], "_active": true, "_components": [ { - "__id__": 102 + "__id__": 95 }, { - "__id__": 103 + "__id__": 96 }, { - "__id__": 104 + "__id__": 97 }, { - "__id__": 105 + "__id__": 98 }, { - "__id__": 106 + "__id__": 99 } ], "_prefab": null, @@ -3690,16 +3463,16 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 98 + "__id__": 91 }, "_children": [], "_active": true, "_components": [ { - "__id__": 100 + "__id__": 93 }, { - "__id__": 101 + "__id__": 94 } ], "_prefab": null, @@ -3738,7 +3511,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 99 + "__id__": 92 }, "_enabled": true, "__prefab": null, @@ -3760,7 +3533,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 99 + "__id__": 92 }, "_enabled": true, "__prefab": null, @@ -3822,7 +3595,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 91 }, "_enabled": true, "__prefab": null, @@ -3844,7 +3617,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 91 }, "_enabled": true, "__prefab": null, @@ -3883,7 +3656,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 91 }, "_enabled": true, "__prefab": null, @@ -3914,7 +3687,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 91 }, "_enabled": true, "__prefab": null, @@ -3942,7 +3715,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 91 }, "_enabled": true, "__prefab": null, @@ -3974,25 +3747,25 @@ }, "_children": [ { - "__id__": 108 + "__id__": 101 } ], "_active": true, "_components": [ { - "__id__": 111 + "__id__": 104 }, { - "__id__": 112 + "__id__": 105 }, { - "__id__": 113 + "__id__": 106 }, { - "__id__": 114 + "__id__": 107 }, { - "__id__": 115 + "__id__": 108 } ], "_prefab": null, @@ -4031,16 +3804,16 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 107 + "__id__": 100 }, "_children": [], "_active": true, "_components": [ { - "__id__": 109 + "__id__": 102 }, { - "__id__": 110 + "__id__": 103 } ], "_prefab": null, @@ -4079,7 +3852,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 108 + "__id__": 101 }, "_enabled": true, "__prefab": null, @@ -4101,7 +3874,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 108 + "__id__": 101 }, "_enabled": true, "__prefab": null, @@ -4163,7 +3936,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 107 + "__id__": 100 }, "_enabled": true, "__prefab": null, @@ -4185,7 +3958,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 107 + "__id__": 100 }, "_enabled": true, "__prefab": null, @@ -4224,7 +3997,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 107 + "__id__": 100 }, "_enabled": true, "__prefab": null, @@ -4255,7 +4028,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 107 + "__id__": 100 }, "_enabled": true, "__prefab": null, @@ -4283,7 +4056,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 107 + "__id__": 100 }, "_enabled": true, "__prefab": null, @@ -4315,25 +4088,25 @@ }, "_children": [ { - "__id__": 117 + "__id__": 110 } ], "_active": true, "_components": [ { - "__id__": 120 + "__id__": 113 }, { - "__id__": 121 + "__id__": 114 }, { - "__id__": 122 + "__id__": 115 }, { - "__id__": 123 + "__id__": 116 }, { - "__id__": 124 + "__id__": 117 } ], "_prefab": null, @@ -4372,16 +4145,16 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 116 + "__id__": 109 }, "_children": [], "_active": true, "_components": [ { - "__id__": 118 + "__id__": 111 }, { - "__id__": 119 + "__id__": 112 } ], "_prefab": null, @@ -4420,7 +4193,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 117 + "__id__": 110 }, "_enabled": true, "__prefab": null, @@ -4442,7 +4215,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 117 + "__id__": 110 }, "_enabled": true, "__prefab": null, @@ -4504,7 +4277,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 116 + "__id__": 109 }, "_enabled": true, "__prefab": null, @@ -4526,7 +4299,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 116 + "__id__": 109 }, "_enabled": true, "__prefab": null, @@ -4565,7 +4338,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 116 + "__id__": 109 }, "_enabled": true, "__prefab": null, @@ -4596,7 +4369,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 116 + "__id__": 109 }, "_enabled": true, "__prefab": null, @@ -4624,7 +4397,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 116 + "__id__": 109 }, "_enabled": true, "__prefab": null, @@ -4656,25 +4429,25 @@ }, "_children": [ { - "__id__": 126 + "__id__": 119 } ], "_active": true, "_components": [ { - "__id__": 129 + "__id__": 122 }, { - "__id__": 130 + "__id__": 123 }, { - "__id__": 131 + "__id__": 124 }, { - "__id__": 132 + "__id__": 125 }, { - "__id__": 133 + "__id__": 126 } ], "_prefab": null, @@ -4713,16 +4486,16 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 125 + "__id__": 118 }, "_children": [], "_active": true, "_components": [ { - "__id__": 127 + "__id__": 120 }, { - "__id__": 128 + "__id__": 121 } ], "_prefab": null, @@ -4761,7 +4534,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 126 + "__id__": 119 }, "_enabled": true, "__prefab": null, @@ -4783,7 +4556,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 126 + "__id__": 119 }, "_enabled": true, "__prefab": null, @@ -4845,7 +4618,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 125 + "__id__": 118 }, "_enabled": true, "__prefab": null, @@ -4867,7 +4640,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 125 + "__id__": 118 }, "_enabled": true, "__prefab": null, @@ -4906,7 +4679,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 125 + "__id__": 118 }, "_enabled": true, "__prefab": null, @@ -4937,7 +4710,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 125 + "__id__": 118 }, "_enabled": true, "__prefab": null, @@ -4965,7 +4738,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 125 + "__id__": 118 }, "_enabled": true, "__prefab": null, @@ -4997,25 +4770,25 @@ }, "_children": [ { - "__id__": 135 + "__id__": 128 } ], "_active": true, "_components": [ { - "__id__": 138 + "__id__": 131 }, { - "__id__": 139 + "__id__": 132 }, { - "__id__": 140 + "__id__": 133 }, { - "__id__": 141 + "__id__": 134 }, { - "__id__": 142 + "__id__": 135 } ], "_prefab": null, @@ -5054,16 +4827,16 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 134 + "__id__": 127 }, "_children": [], "_active": true, "_components": [ { - "__id__": 136 + "__id__": 129 }, { - "__id__": 137 + "__id__": 130 } ], "_prefab": null, @@ -5102,7 +4875,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 135 + "__id__": 128 }, "_enabled": true, "__prefab": null, @@ -5124,7 +4897,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 135 + "__id__": 128 }, "_enabled": true, "__prefab": null, @@ -5186,7 +4959,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 134 + "__id__": 127 }, "_enabled": true, "__prefab": null, @@ -5208,7 +4981,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 134 + "__id__": 127 }, "_enabled": true, "__prefab": null, @@ -5247,7 +5020,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 134 + "__id__": 127 }, "_enabled": true, "__prefab": null, @@ -5278,7 +5051,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 134 + "__id__": 127 }, "_enabled": true, "__prefab": null, @@ -5306,7 +5079,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 134 + "__id__": 127 }, "_enabled": true, "__prefab": null, @@ -5338,25 +5111,25 @@ }, "_children": [ { - "__id__": 144 + "__id__": 137 } ], "_active": true, "_components": [ { - "__id__": 147 + "__id__": 140 }, { - "__id__": 148 + "__id__": 141 }, { - "__id__": 149 + "__id__": 142 }, { - "__id__": 150 + "__id__": 143 }, { - "__id__": 151 + "__id__": 144 } ], "_prefab": null, @@ -5395,16 +5168,16 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 143 + "__id__": 136 }, "_children": [], "_active": true, "_components": [ { - "__id__": 145 + "__id__": 138 }, { - "__id__": 146 + "__id__": 139 } ], "_prefab": null, @@ -5443,7 +5216,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 144 + "__id__": 137 }, "_enabled": true, "__prefab": null, @@ -5465,7 +5238,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 144 + "__id__": 137 }, "_enabled": true, "__prefab": null, @@ -5527,7 +5300,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 143 + "__id__": 136 }, "_enabled": true, "__prefab": null, @@ -5549,7 +5322,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 143 + "__id__": 136 }, "_enabled": true, "__prefab": null, @@ -5588,7 +5361,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 143 + "__id__": 136 }, "_enabled": true, "__prefab": null, @@ -5619,7 +5392,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 143 + "__id__": 136 }, "_enabled": true, "__prefab": null, @@ -5647,7 +5420,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 143 + "__id__": 136 }, "_enabled": true, "__prefab": null, @@ -5679,25 +5452,25 @@ }, "_children": [ { - "__id__": 153 + "__id__": 146 } ], "_active": true, "_components": [ { - "__id__": 156 + "__id__": 149 }, { - "__id__": 157 + "__id__": 150 }, { - "__id__": 158 + "__id__": 151 }, { - "__id__": 159 + "__id__": 152 }, { - "__id__": 160 + "__id__": 153 } ], "_prefab": null, @@ -5736,16 +5509,16 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 152 + "__id__": 145 }, "_children": [], "_active": true, "_components": [ { - "__id__": 154 + "__id__": 147 }, { - "__id__": 155 + "__id__": 148 } ], "_prefab": null, @@ -5784,7 +5557,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 153 + "__id__": 146 }, "_enabled": true, "__prefab": null, @@ -5806,7 +5579,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 153 + "__id__": 146 }, "_enabled": true, "__prefab": null, @@ -5868,7 +5641,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 152 + "__id__": 145 }, "_enabled": true, "__prefab": null, @@ -5890,7 +5663,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 152 + "__id__": 145 }, "_enabled": true, "__prefab": null, @@ -5929,7 +5702,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 152 + "__id__": 145 }, "_enabled": true, "__prefab": null, @@ -5960,7 +5733,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 152 + "__id__": 145 }, "_enabled": true, "__prefab": null, @@ -5988,7 +5761,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 152 + "__id__": 145 }, "_enabled": true, "__prefab": null, @@ -6020,32 +5793,32 @@ }, "_children": [ { - "__id__": 162 + "__id__": 155 } ], "_active": true, "_components": [ { - "__id__": 165 + "__id__": 158 }, { - "__id__": 166 + "__id__": 159 }, { - "__id__": 167 + "__id__": 160 }, { - "__id__": 168 + "__id__": 161 }, { - "__id__": 169 + "__id__": 162 } ], "_prefab": null, "_lpos": { "__type__": "cc.Vec3", - "x": 223.572, - "y": 652.966, + "x": 241.588, + "y": 656.302, "z": 0 }, "_lrot": { @@ -6077,16 +5850,16 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 161 + "__id__": 154 }, "_children": [], "_active": true, "_components": [ { - "__id__": 163 + "__id__": 156 }, { - "__id__": 164 + "__id__": 157 } ], "_prefab": null, @@ -6125,7 +5898,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 162 + "__id__": 155 }, "_enabled": true, "__prefab": null, @@ -6147,7 +5920,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 162 + "__id__": 155 }, "_enabled": true, "__prefab": null, @@ -6209,7 +5982,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 161 + "__id__": 154 }, "_enabled": true, "__prefab": null, @@ -6231,7 +6004,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 161 + "__id__": 154 }, "_enabled": true, "__prefab": null, @@ -6270,7 +6043,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 161 + "__id__": 154 }, "_enabled": true, "__prefab": null, @@ -6301,7 +6074,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 161 + "__id__": 154 }, "_enabled": true, "__prefab": null, @@ -6329,7 +6102,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 161 + "__id__": 154 }, "_enabled": true, "__prefab": null, @@ -6341,13 +6114,13 @@ "_restitution": 0, "_offset": { "__type__": "cc.Vec2", - "x": 2.5, - "y": -2.4 + "x": -4.4, + "y": -7 }, "_size": { "__type__": "cc.Size", - "width": 41.4, - "height": 96.6 + "width": 78, + "height": 137.9 }, "_id": "8fSg2JDOJHeagIqakOhwiB" }, @@ -6363,7 +6136,7 @@ "_active": true, "_components": [ { - "__id__": 171 + "__id__": 164 } ], "_prefab": null, @@ -6402,7 +6175,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 170 + "__id__": 163 }, "_enabled": true, "__prefab": null, @@ -6427,10 +6200,10 @@ "_active": true, "_components": [ { - "__id__": 173 + "__id__": 166 }, { - "__id__": 174 + "__id__": 167 } ], "_prefab": null, @@ -6469,7 +6242,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 172 + "__id__": 165 }, "_enabled": true, "__prefab": null, @@ -6491,7 +6264,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 172 + "__id__": 165 }, "_enabled": true, "__prefab": null, @@ -6503,6 +6276,886 @@ "shadowAlpha": 80, "_id": "acBHXYdhZPIoeVkoV+ydRP" }, + { + "__type__": "cc.Node", + "_name": "Shadow-001", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 169 + }, + { + "__id__": 170 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "b7roqNB8xKOpUcXBq2cPTn" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 168 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "17CkoQ5i5JSa4MscYMKd4v" + }, + { + "__type__": "d627bjTuB1Oarms89lim9q6", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 168 + }, + "_enabled": true, + "__prefab": null, + "target": { + "__id__": 73 + }, + "shadowWidth": 60, + "shadowHeight": 20, + "shadowAlpha": 80, + "_id": "05KTlBsydGXLc8Lc++Px3B" + }, + { + "__type__": "cc.Node", + "_name": "Shadow-002", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 172 + }, + { + "__id__": 173 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "9fMERlpnxHBqx1V+IPOWVJ" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 171 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "70out6o7tJK5QlCvWQGmfD" + }, + { + "__type__": "d627bjTuB1Oarms89lim9q6", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 171 + }, + "_enabled": true, + "__prefab": null, + "target": { + "__id__": 82 + }, + "shadowWidth": 60, + "shadowHeight": 20, + "shadowAlpha": 80, + "_id": "1aQ3s8m0VInpc+gDgbYllh" + }, + { + "__type__": "cc.Node", + "_name": "Shadow-003", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 175 + }, + { + "__id__": 176 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "d0Rp1JABpCwohjqMSoEDqp" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 174 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "8f8gbrW91F6rLShq4W3oW1" + }, + { + "__type__": "d627bjTuB1Oarms89lim9q6", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 174 + }, + "_enabled": true, + "__prefab": null, + "target": { + "__id__": 91 + }, + "shadowWidth": 60, + "shadowHeight": 20, + "shadowAlpha": 80, + "_id": "00N5Bm4zZJV4D12ZdpCrgN" + }, + { + "__type__": "cc.Node", + "_name": "Shadow-004", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 178 + }, + { + "__id__": 179 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "350Jb3XzNGgJ0KvgUo4wH9" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 177 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "efZ0fTtbxAAYqce+Sraw0C" + }, + { + "__type__": "d627bjTuB1Oarms89lim9q6", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 177 + }, + "_enabled": true, + "__prefab": null, + "target": { + "__id__": 100 + }, + "shadowWidth": 60, + "shadowHeight": 20, + "shadowAlpha": 80, + "_id": "28ZJ3yxoNDTY4a4p1HSBMn" + }, + { + "__type__": "cc.Node", + "_name": "Shadow-005", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 181 + }, + { + "__id__": 182 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "c6Hzif9RhIZbm/QEbNbNmV" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 180 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "3boAGl8R5MApIWH2m1B2wk" + }, + { + "__type__": "d627bjTuB1Oarms89lim9q6", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 180 + }, + "_enabled": true, + "__prefab": null, + "target": { + "__id__": 109 + }, + "shadowWidth": 60, + "shadowHeight": 20, + "shadowAlpha": 80, + "_id": "02K2tDRCVLLINGuX/hIc9S" + }, + { + "__type__": "cc.Node", + "_name": "Shadow-006", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 184 + }, + { + "__id__": 185 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "b0brUKCeFPGZhW/P8c5440" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 183 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "c8gtBN2CdATqC5x39y0FF3" + }, + { + "__type__": "d627bjTuB1Oarms89lim9q6", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 183 + }, + "_enabled": true, + "__prefab": null, + "target": { + "__id__": 118 + }, + "shadowWidth": 60, + "shadowHeight": 20, + "shadowAlpha": 80, + "_id": "39iwJwaiFNYZVWUka4WNCN" + }, + { + "__type__": "cc.Node", + "_name": "Shadow-007", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 187 + }, + { + "__id__": 188 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "e41K9VWZtMib1Wz9Ox6zpt" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 186 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "0b0t4m91hGg6KwCzZ2l4PQ" + }, + { + "__type__": "d627bjTuB1Oarms89lim9q6", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 186 + }, + "_enabled": true, + "__prefab": null, + "target": { + "__id__": 127 + }, + "shadowWidth": 60, + "shadowHeight": 20, + "shadowAlpha": 80, + "_id": "c8i6KXpSJFK6eE9JS/KG3E" + }, + { + "__type__": "cc.Node", + "_name": "Shadow-008", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 190 + }, + { + "__id__": 191 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "2d2CbjBkdDJK9fCHNUevBr" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 189 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "adBHhRcNxOi7AC0i2qGtzQ" + }, + { + "__type__": "d627bjTuB1Oarms89lim9q6", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 189 + }, + "_enabled": true, + "__prefab": null, + "target": { + "__id__": 136 + }, + "shadowWidth": 60, + "shadowHeight": 20, + "shadowAlpha": 80, + "_id": "c8RiJR05lNmovFNOElY6Fg" + }, + { + "__type__": "cc.Node", + "_name": "Shadow-009", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 193 + }, + { + "__id__": 194 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "930niPnWVFZKutLmKpKl+G" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 192 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "31BgNivLBPW4bLqSmU+XqM" + }, + { + "__type__": "d627bjTuB1Oarms89lim9q6", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 192 + }, + "_enabled": true, + "__prefab": null, + "target": { + "__id__": 145 + }, + "shadowWidth": 60, + "shadowHeight": 20, + "shadowAlpha": 80, + "_id": "7aH+CyKqdK/oGVjx5H1TNO" + }, + { + "__type__": "cc.Node", + "_name": "Shadow-010", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 196 + }, + { + "__id__": 197 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "04Ibm6FrdMPIpGZZLXBE7l" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 195 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "balqXXly9OF4+YCtGJb7HD" + }, + { + "__type__": "d627bjTuB1Oarms89lim9q6", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 195 + }, + "_enabled": true, + "__prefab": null, + "target": { + "__id__": 154 + }, + "shadowWidth": 60, + "shadowHeight": 20, + "shadowAlpha": 80, + "_id": "e5TN9ghthAsIpd5RkqHqDH" + }, { "__type__": "cc.Node", "_name": "Guide", @@ -6515,13 +7168,13 @@ "_active": true, "_components": [ { - "__id__": 176 + "__id__": 199 }, { - "__id__": 177 + "__id__": 200 }, { - "__id__": 178 + "__id__": 201 } ], "_prefab": null, @@ -6560,7 +7213,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 175 + "__id__": 198 }, "_enabled": true, "__prefab": null, @@ -6582,7 +7235,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 175 + "__id__": 198 }, "_enabled": true, "__prefab": null, @@ -6605,7 +7258,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 175 + "__id__": 198 }, "_enabled": true, "__prefab": null, @@ -6693,28 +7346,28 @@ { "__type__": "cc.SceneGlobals", "ambient": { - "__id__": 182 + "__id__": 205 }, "shadows": { - "__id__": 183 + "__id__": 206 }, "_skybox": { - "__id__": 184 + "__id__": 207 }, "fog": { - "__id__": 185 + "__id__": 208 }, "octree": { - "__id__": 186 + "__id__": 209 }, "skin": { - "__id__": 187 + "__id__": 210 }, "lightProbeInfo": { - "__id__": 188 + "__id__": 211 }, "postSettings": { - "__id__": 189 + "__id__": 212 }, "bakedWithStationaryMainLight": false, "bakedWithHighpLightmap": false diff --git a/assets/scripts/CameraFollow.ts b/assets/scripts/CameraFollow.ts index bb623a3..e81c412 100644 --- a/assets/scripts/CameraFollow.ts +++ b/assets/scripts/CameraFollow.ts @@ -1,4 +1,4 @@ -import { _decorator, Component, Node, Vec3, Camera, view } from 'cc'; +import { _decorator, Component, Node, Vec3, Camera, view, find } from 'cc'; const { ccclass, property } = _decorator; @ccclass('CameraFollow') @@ -22,84 +22,145 @@ export class CameraFollow extends Component { @property mapHeight: number = 1920; // 地图高度 + + @property + initialFocusNodeName: string = 'guai_10'; + + @property + initialFocusDuration: number = 2.0; + private camera: Camera | null = null; + private readonly _targetPosition: Vec3 = new Vec3(); + private readonly _desiredPosition: Vec3 = new Vec3(); + private readonly _newPosition: Vec3 = new Vec3(); + private initialFocusNode: Node | null = null; + private initialFocusTimer = 0; + private isInitialFocusActive = false; onLoad() { // 获取相机组件 this.camera = this.getComponent(Camera); - this.camera.orthoHeight = 680 if (!this.camera) { console.error('CameraFollow: 未找到Camera组件'); + return; } + // 根据项目需要调整初始正交高度 + this.camera.orthoHeight = 550; } start() { - if (this.target) { - // 初始化相机位置 - const initialPos = this.target.position.clone(); - initialPos.add(this.offset); - this.node.position = initialPos; + const hasInitialFocus = this.beginInitialFocus(); + + if (!hasInitialFocus && this.target) { + this.snapToNode(this.target); } } update(deltaTime: number) { + if (this.isInitialFocusActive) { + if (this.initialFocusNode) { + this.snapToNode(this.initialFocusNode); + } + + this.initialFocusTimer -= deltaTime; + if (this.initialFocusTimer > 0) { + return; + } + + this.isInitialFocusActive = false; + } + if (!this.target) return; - // 计算目标位置 - const targetPosition = this.target.position.clone(); - targetPosition.add(this.offset); + this.target.getPosition(this._targetPosition); + Vec3.add(this._desiredPosition, this._targetPosition, this.offset); // 应用地图边界限制 - const clampedPosition = this.clampCameraPosition(targetPosition); + const clampedPosition = this.clampCameraPosition(this._desiredPosition); // 使用插值实现平滑跟随 const currentPosition = this.node.position; - const newPosition = new Vec3(); + const lerpFactor = this.computeLerpFactor(deltaTime); - // 根据平滑度设置插值速度 - const lerpFactor = Math.min(1.0, this.followSpeed * deltaTime * (1 - this.smoothness + 0.1)); + if (lerpFactor >= 1) { + this.node.setPosition(clampedPosition); + return; + } - Vec3.lerp(newPosition, currentPosition, clampedPosition, lerpFactor); - this.node.position = newPosition; + Vec3.lerp(this._newPosition, currentPosition, clampedPosition, lerpFactor); + this.node.setPosition(this._newPosition); } // 限制相机位置在地图边界内 private clampCameraPosition(position: Vec3): Vec3 { - if (!this.camera) return position; + if (!this.camera) return position.clone(); // 获取屏幕可见区域大小 const visibleSize = view.getVisibleSize(); + const aspectRatio = visibleSize.height > 0 ? visibleSize.width / visibleSize.height : 1; - // 计算相机能看到的世界区域的一半 - const halfCameraWidth = visibleSize.width * 0.5; - const halfCameraHeight = visibleSize.height * 0.5; + // 计算相机能看到的世界区域的一半(正交相机)。缩放后需要除以 zoomRatio。 + const cameraWithZoom = this.camera as Camera & { zoomRatio?: number }; + const zoomRatio = cameraWithZoom.zoomRatio ?? 1; + const halfCameraHeight = this.camera.orthoHeight / Math.max(zoomRatio, 0.0001); + const halfCameraWidth = halfCameraHeight * aspectRatio; - // 计算地图边界(地图锚点为0.5,0.5,所以范围是-mapWidth/2到+mapWidth/2) const mapHalfWidth = this.mapWidth * 0.5; const mapHalfHeight = this.mapHeight * 0.5; - // 计算相机位置的边界(确保相机边缘不超出地图边界) - const minX = -mapHalfWidth + halfCameraWidth; - const maxX = mapHalfWidth - halfCameraWidth; - const minY = -mapHalfHeight + halfCameraHeight; - const maxY = mapHalfHeight - halfCameraHeight; - - // 限制相机位置 const clampedPosition = position.clone(); - clampedPosition.x = Math.max(minX, Math.min(maxX, position.x)); - clampedPosition.y = Math.max(minY, Math.min(maxY, position.y)); + + if (mapHalfWidth <= halfCameraWidth) { + // 地图宽度不足以填满视野,水平居中 + clampedPosition.x = 0; + } else { + const minX = -mapHalfWidth + halfCameraWidth; + const maxX = mapHalfWidth - halfCameraWidth; + clampedPosition.x = Math.max(minX, Math.min(maxX, clampedPosition.x)); + } + + if (mapHalfHeight <= halfCameraHeight) { + // 地图高度不足以填满视野,垂直居中 + clampedPosition.y = 0; + } else { + const minY = -mapHalfHeight + halfCameraHeight; + const maxY = mapHalfHeight - halfCameraHeight; + clampedPosition.y = Math.max(minY, Math.min(maxY, clampedPosition.y)); + } return clampedPosition; } + private computeLerpFactor(deltaTime: number): number { + if (deltaTime <= 0) { + return 0; + } + + const speed = Math.max(0, this.followSpeed); + if (speed <= 0) { + return 0; + } + + if (this.smoothness <= 0) { + return 1; + } + + const smooth = Math.min(this.smoothness, 0.9999); + const followRate = speed * (1 - smooth); + if (followRate <= 0) { + return 0; + } + + const lerpFactor = 1 - Math.exp(-followRate * deltaTime); + return Math.min(1, Math.max(0, lerpFactor)); + } + // 设置跟随目标 setTarget(target: Node) { this.target = target; - if (target) { - const initialPos = target.position.clone(); - initialPos.add(this.offset); - this.node.position = initialPos; + if (target && !this.isInitialFocusActive) { + this.snapToNode(target); } } @@ -112,9 +173,58 @@ export class CameraFollow extends Component { snapToTarget() { if (!this.target) return; - const targetPosition = this.target.position.clone(); - targetPosition.add(this.offset); - const clampedPosition = this.clampCameraPosition(targetPosition); - this.node.position = clampedPosition; + this.snapToNode(this.target); } -} \ No newline at end of file + + private beginInitialFocus(): boolean { + if (this.initialFocusDuration <= 0) { + return false; + } + + let focusNode = this.initialFocusNode; + + if (!focusNode) { + const scene = this.node.scene; + if (!scene) { + return false; + } + + if (this.initialFocusNodeName) { + focusNode = find(this.initialFocusNodeName, scene) ?? this.findNodeByName(scene, this.initialFocusNodeName); + } + } + + if (!focusNode) { + return false; + } + + this.initialFocusNode = focusNode; + this.initialFocusTimer = this.initialFocusDuration; + this.isInitialFocusActive = true; + this.snapToNode(focusNode); + return true; + } + + private snapToNode(node: Node) { + node.getPosition(this._targetPosition); + Vec3.add(this._desiredPosition, this._targetPosition, this.offset); + const clamped = this.clampCameraPosition(this._desiredPosition); + this.node.setPosition(clamped); + } + + private findNodeByName(root: Node, name: string): Node | null { + if (root.name === name) { + return root; + } + + for (let i = 0; i < root.children.length; i++) { + const child = root.children[i]; + const match = this.findNodeByName(child, name); + if (match) { + return match; + } + } + + return null; + } +} diff --git a/assets/scripts/PlayerController.ts b/assets/scripts/PlayerController.ts index 904438c..2dffb36 100644 --- a/assets/scripts/PlayerController.ts +++ b/assets/scripts/PlayerController.ts @@ -1,4 +1,4 @@ -import { _decorator, Component, Node, Vec3, input, Input, EventTouch, Camera, view, tween, Animation, Collider2D, Contact2DType, Label, Color, Canvas, UITransform, AudioSource } from 'cc'; +import { _decorator, Component, Node, Vec3, input, Input, EventTouch, Camera, view, tween, Animation, Collider2D, Contact2DType, Label, Color, Canvas, UITransform, AudioSource, Sprite } from 'cc'; import { TiledMapPathfinder } from './TiledMapPathfinder'; const { ccclass, property } = _decorator; @@ -13,6 +13,9 @@ export class PlayerController extends Component { @property(Node) bonus: Node | null = null; + @property(Node) + bonusWuqi: Node | null = null; + @property(Camera) camera: Camera | null = null; // 主摄像机 @@ -49,6 +52,9 @@ export class PlayerController extends Component { private props: Node[] = []; private guideNode: Node | null = null; + private activePopup: Node | null = null; + private activePopupName: string | null = null; + private pendingPopupHide: (() => void) | null = null; onLoad() { this.guideNode = this.canvas.node.getChildByName('Guide'); @@ -65,11 +71,15 @@ export class PlayerController extends Component { this.initProps(); // this.showBonusPopup() + // this.scheduleOnce(() => { + // this.showBonusPopup() + // }, 5); } onDestroy() { // 移除触摸事件 input.off(Input.EventType.TOUCH_START, this.onTouchStart, this); + this.clearPopupHideSchedule(); } start() { @@ -134,6 +144,11 @@ export class PlayerController extends Component { } private onTouchStart(event: EventTouch) { + if (this.activePopup) { + this.hideActivePopup(); + return; + } + if (!this.player || !this.camera || !this.pathfinder || this.isAttacking || this.isGameOver || this.isWin) return; this.guideNode.active = false; @@ -626,6 +641,7 @@ export class PlayerController extends Component { // 所有动画完成后,播放升级动画并设置升级状态 this.playLevelUpAnimation(); this.isUpgraded = true; + this.showWeaponBonusPopup(); console.log('所有道具飞行动画完成,玩家已升级,后续动画将使用升级版本'); } @@ -663,64 +679,60 @@ export class PlayerController extends Component { * 根据当前镜头位置和正交高度,将奖励节点正确缩放并移动到画面正中间 */ public showBonusPopup() { - if (!this.bonus || !this.camera || !this.canvas) { - console.warn('奖励节点、相机或画布未设置,无法显示奖励弹窗'); + this.showPopupAtCameraCenter(this.bonus, '奖励弹窗'); + } + + /** + * 弹出武器奖励 + */ + public showWeaponBonusPopup() { + this.showPopupAtCameraCenter(this.bonusWuqi, '武器奖励'); + } + + private showPopupAtCameraCenter(popup: Node | null, nameForLog: string) { + if (!popup || !this.camera || !this.canvas) { + console.warn(`${nameForLog}节点、相机或画布未设置,无法显示${nameForLog}`); return; } - // 确保奖励节点是激活状态 - this.bonus.active = true; + this.clearPopupHideSchedule(); + + popup.active = true; - // 获取相机位置,相机所在的世界坐标就是当前屏幕的中心 const cameraPos = this.camera.node.position; const orthoHeight = this.camera.orthoHeight; - // 直接将弹窗设置到相机位置(屏幕中心) - this.bonus.setPosition(cameraPos.x, cameraPos.y, 0); + popup.setPosition(cameraPos.x, cameraPos.y, 0); - // 计算合适的缩放比例,确保弹窗在不同正交高度下都能正确显示 - // 基础缩放比例 - const baseScale = 1.0; - - // 根据正交高度调整缩放,确保弹窗大小合适 - // 假设标准正交高度为500,以此为基准进行缩放 + const baseScale = 0.8; const standardOrthoHeight = 500; const scaleRatio = standardOrthoHeight / orthoHeight; const finalScale = baseScale * scaleRatio; - // 设置奖励节点的缩放 - this.bonus.setScale(finalScale, finalScale, 1); + popup.setScale(finalScale, finalScale, 1); - // 添加弹窗出现动画 - this.playBonusPopupAnimation(); + this.activePopup = popup; + this.activePopupName = nameForLog; - // 监听领取按钮 - const receiveButton = this.bonus.getChildByName('Receive'); - const bonusWuqi = this.bonus.getChildByName('BonusWuqi'); - const bonusAnim = this.bonus.getChildByName('BonusAnim'); - console.log('this.bonus', this.bonus); - if (receiveButton) { - receiveButton.on('click', () => { - bonusAnim.active = false - bonusWuqi.active = true - }, this); - } + this.playPopupAppearAnimation(popup, nameForLog); + + this.pendingPopupHide = () => { + this.pendingPopupHide = null; + this.hideActivePopup(); + }; + + this.scheduleOnce(this.pendingPopupHide, 3); } /** * 播放奖励弹窗出现动画 */ - private playBonusPopupAnimation() { - if (!this.bonus) return; + private playPopupAppearAnimation(popup: Node, nameForLog: string) { + const originalScale = popup.scale.clone(); - // 保存原始缩放 - const originalScale = this.bonus.scale.clone(); + popup.setScale(0.1, 0.1, 1); - // 初始状态设置为很小 - this.bonus.setScale(0.1, 0.1, 1); - - // 创建弹窗弹出动画 - tween(this.bonus) + tween(popup) .to(0.3, { scale: new Vec3(originalScale.x * 1.2, originalScale.y * 1.2, originalScale.z) }, { @@ -732,7 +744,7 @@ export class PlayerController extends Component { easing: 'sineInOut' }) .call(() => { - console.log('奖励弹窗显示完成'); + console.log(`${nameForLog}显示完成`); }) .start(); } @@ -743,17 +755,52 @@ export class PlayerController extends Component { public hideBonusPopup() { if (!this.bonus) return; - // 创建弹窗消失动画 - tween(this.bonus) + if (this.activePopup === this.bonus) { + this.hideActivePopup(); + return; + } + + if (!this.bonus.active) return; + + this.hidePopupWithAnimation(this.bonus, '奖励弹窗'); + } + + private hideActivePopup() { + if (!this.activePopup) { + return; + } + + const popupToHide = this.activePopup; + const nameForLog = this.activePopupName || '弹窗'; + + this.clearPopupHideSchedule(); + + this.activePopup = null; + this.activePopupName = null; + + this.hidePopupWithAnimation(popupToHide, nameForLog); + } + + private hidePopupWithAnimation(popup: Node, nameForLog: string) { + tween(popup).stop(); + + tween(popup) .to(0.2, { scale: new Vec3(0.1, 0.1, 1) }, { easing: 'backIn' }) .call(() => { - this.bonus.active = false; - console.log('奖励弹窗已隐藏'); + popup.active = false; + console.log(`${nameForLog}已隐藏`); }) .start(); } -} \ No newline at end of file + + private clearPopupHideSchedule() { + if (this.pendingPopupHide) { + this.unschedule(this.pendingPopupHide); + this.pendingPopupHide = null; + } + } +} diff --git a/assets/scripts/Shadow2D.ts b/assets/scripts/Shadow2D.ts index fa6bb2b..eb47ab6 100644 --- a/assets/scripts/Shadow2D.ts +++ b/assets/scripts/Shadow2D.ts @@ -45,8 +45,16 @@ export class Shadow2D extends Component { update(dt: number) { if (!this.shadowNode || !this.target) return; + if (!this.target.active) { + this.shadowNode.active = false; + return; + } + // 始终保持在角色底部(比如角色动画高度变化时也能跟随) let ui = this.target.getComponent(UITransform); + + if (!ui) return; + this.shadowNode.setPosition(0, -ui.height / 2); } }