From 1912f52b834d764710ae75d665c63672e154bed4 Mon Sep 17 00:00:00 2001 From: tiendat3699 <96950844+tiendat3699@users.noreply.github.com> Date: Wed, 6 Mar 2024 18:09:17 +0700 Subject: [PATCH] feat: object pooling --- assets/_Game/Prefabs/Ball.prefab | 15 +- assets/_Game/Prefabs/Obstacles.meta | 12 - .../Prefabs/Obstacles/Easy Obstacle 1.prefab | 707 ------------------ .../Obstacles/Easy Obstacle 1.prefab.meta | 13 - .../Prefabs/Obstacles/Easy Obstacle 2.prefab | 697 ----------------- .../Obstacles/Easy Obstacle 2.prefab.meta | 13 - .../Prefabs/Obstacles/Easy Obstacle 3.prefab | 701 ----------------- .../Obstacles/Easy Obstacle 3.prefab.meta | 13 - .../_Game/Prefabs/Obstacles/Obstacle.prefab | 216 ------ .../Prefabs/Obstacles/Obstacle.prefab.meta | 13 - assets/_Game/Scenes/EndLessScene.scene | 426 ++++++----- assets/_Game/Scripts/Gameplay/Flipper.ts | 98 ++- assets/_Game/Scripts/Manager/GameManager.ts | 20 +- .../Scripts/Pool/{Pool.ts => ObjectPool.ts} | 53 +- .../Pool/{Pool.ts.meta => ObjectPool.ts.meta} | 2 +- 15 files changed, 393 insertions(+), 2606 deletions(-) delete mode 100644 assets/_Game/Prefabs/Obstacles.meta delete mode 100644 assets/_Game/Prefabs/Obstacles/Easy Obstacle 1.prefab delete mode 100644 assets/_Game/Prefabs/Obstacles/Easy Obstacle 1.prefab.meta delete mode 100644 assets/_Game/Prefabs/Obstacles/Easy Obstacle 2.prefab delete mode 100644 assets/_Game/Prefabs/Obstacles/Easy Obstacle 2.prefab.meta delete mode 100644 assets/_Game/Prefabs/Obstacles/Easy Obstacle 3.prefab delete mode 100644 assets/_Game/Prefabs/Obstacles/Easy Obstacle 3.prefab.meta delete mode 100644 assets/_Game/Prefabs/Obstacles/Obstacle.prefab delete mode 100644 assets/_Game/Prefabs/Obstacles/Obstacle.prefab.meta rename assets/_Game/Scripts/Pool/{Pool.ts => ObjectPool.ts} (52%) rename assets/_Game/Scripts/Pool/{Pool.ts.meta => ObjectPool.ts.meta} (70%) diff --git a/assets/_Game/Prefabs/Ball.prefab b/assets/_Game/Prefabs/Ball.prefab index 7d91763..0ae4530 100644 --- a/assets/_Game/Prefabs/Ball.prefab +++ b/assets/_Game/Prefabs/Ball.prefab @@ -952,10 +952,9 @@ "fileId": "9crXsAtjdEQIcD0a2IceFl" }, { - "__type__": "cad12cEubBIXb2NvvCon5Ge", + "__type__": "b14f8NWzRJDNL9eRfPhDx3G", "_name": "", "_objFlags": 0, - "__editorExtras__": {}, "node": { "__id__": 1 }, @@ -963,21 +962,11 @@ "__prefab": { "__id__": 70 }, - "maxSpeed": 100, - "rigidbody": { - "__id__": 67 - }, - "collider": { - "__id__": 65 - }, - "trail": { - "__id__": 3 - }, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "c1lmpQL0VK3q2DI79nkPRA" + "fileId": "69msKyk8NLHqP+rm4QOaXF" }, { "__type__": "cc.PrefabInfo", diff --git a/assets/_Game/Prefabs/Obstacles.meta b/assets/_Game/Prefabs/Obstacles.meta deleted file mode 100644 index f77b1af..0000000 --- a/assets/_Game/Prefabs/Obstacles.meta +++ /dev/null @@ -1,12 +0,0 @@ -{ - "ver": "1.1.0", - "importer": "directory", - "imported": true, - "uuid": "4b7ba894-d27b-4472-9a6b-5a08f677f44f", - "files": [], - "subMetas": {}, - "userData": { - "compressionType": {}, - "isRemoteBundle": {} - } -} diff --git a/assets/_Game/Prefabs/Obstacles/Easy Obstacle 1.prefab b/assets/_Game/Prefabs/Obstacles/Easy Obstacle 1.prefab deleted file mode 100644 index de01042..0000000 --- a/assets/_Game/Prefabs/Obstacles/Easy Obstacle 1.prefab +++ /dev/null @@ -1,707 +0,0 @@ -[ - { - "__type__": "cc.Prefab", - "_name": "Easy Obstacle 1", - "_objFlags": 0, - "_native": "", - "data": { - "__id__": 1 - }, - "optimizationPolicy": 0, - "persistent": false - }, - { - "__type__": "cc.Node", - "_name": "Easy Obstacle 1", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": null, - "_children": [ - { - "__id__": 2 - }, - { - "__id__": 4 - }, - { - "__id__": 6 - }, - { - "__id__": 17 - }, - { - "__id__": 28 - } - ], - "_active": true, - "_components": [ - { - "__id__": 39 - }, - { - "__id__": 41 - } - ], - "_prefab": { - "__id__": 43 - }, - "_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": "" - }, - { - "__type__": "cc.Node", - "_name": "Waypoint L", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_children": [], - "_active": true, - "_components": [], - "_prefab": { - "__id__": 3 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": -75, - "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": "" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "de8VqIuyVFIJIRj77PlLqI", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.Node", - "_name": "Waypoint R", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_children": [], - "_active": true, - "_components": [], - "_prefab": { - "__id__": 5 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": 75, - "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": "" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "8ezI4xD7dPB7nmq1CTcPMa", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.Node", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_prefab": { - "__id__": 7 - }, - "__editorExtras__": {} - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 6 - }, - "asset": { - "__uuid__": "f49ff774-8d49-42fd-81de-aeb7f53d03f5", - "__expectedType__": "cc.Prefab" - }, - "fileId": "a0kYAhzm5AAa3h8r/fe/j5", - "instance": { - "__id__": 8 - }, - "targetOverrides": null - }, - { - "__type__": "cc.PrefabInstance", - "fileId": "e633jfzBlG8YZuWVy1ieV8", - "prefabRootNode": { - "__id__": 1 - }, - "mountedChildren": [], - "mountedComponents": [], - "propertyOverrides": [ - { - "__id__": 9 - }, - { - "__id__": 11 - }, - { - "__id__": 12 - }, - { - "__id__": 13 - }, - { - "__id__": 14 - }, - { - "__id__": 16 - } - ], - "removedComponents": [] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 10 - }, - "propertyPath": [ - "_name" - ], - "value": "Obstacle" - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "a0kYAhzm5AAa3h8r/fe/j5" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 10 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": 75, - "y": -80, - "z": 0 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 10 - }, - "propertyPath": [ - "_lrot" - ], - "value": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": -0.7071067811865475, - "w": 0.7071067811865476 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 10 - }, - "propertyPath": [ - "_euler" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": -90 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 15 - }, - "propertyPath": [ - "_restitution" - ], - "value": 0.3 - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "7egu3Zm5tHjb52E6fmax1G" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 15 - }, - "propertyPath": [ - "_friction" - ], - "value": 2 - }, - { - "__type__": "cc.Node", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_prefab": { - "__id__": 18 - }, - "__editorExtras__": {} - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 17 - }, - "asset": { - "__uuid__": "f49ff774-8d49-42fd-81de-aeb7f53d03f5", - "__expectedType__": "cc.Prefab" - }, - "fileId": "a0kYAhzm5AAa3h8r/fe/j5", - "instance": { - "__id__": 19 - }, - "targetOverrides": null - }, - { - "__type__": "cc.PrefabInstance", - "fileId": "369FaOtYlAMoSc+EHcwivl", - "prefabRootNode": { - "__id__": 1 - }, - "mountedChildren": [], - "mountedComponents": [], - "propertyOverrides": [ - { - "__id__": 20 - }, - { - "__id__": 22 - }, - { - "__id__": 23 - }, - { - "__id__": 24 - }, - { - "__id__": 25 - }, - { - "__id__": 27 - } - ], - "removedComponents": [] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 21 - }, - "propertyPath": [ - "_name" - ], - "value": "Obstacle" - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "a0kYAhzm5AAa3h8r/fe/j5" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 21 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": -75, - "y": -80, - "z": 0 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 21 - }, - "propertyPath": [ - "_lrot" - ], - "value": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": -0.7071067811865475, - "w": 0.7071067811865476 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 21 - }, - "propertyPath": [ - "_euler" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": -90 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 26 - }, - "propertyPath": [ - "_restitution" - ], - "value": 0.3 - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "7egu3Zm5tHjb52E6fmax1G" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 26 - }, - "propertyPath": [ - "_friction" - ], - "value": 2 - }, - { - "__type__": "cc.Node", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_prefab": { - "__id__": 29 - }, - "__editorExtras__": {} - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 28 - }, - "asset": { - "__uuid__": "f49ff774-8d49-42fd-81de-aeb7f53d03f5", - "__expectedType__": "cc.Prefab" - }, - "fileId": "a0kYAhzm5AAa3h8r/fe/j5", - "instance": { - "__id__": 30 - }, - "targetOverrides": null - }, - { - "__type__": "cc.PrefabInstance", - "fileId": "c5w6eyXR5HprwDgmS1eEzX", - "prefabRootNode": { - "__id__": 1 - }, - "mountedChildren": [], - "mountedComponents": [], - "propertyOverrides": [ - { - "__id__": 31 - }, - { - "__id__": 33 - }, - { - "__id__": 34 - }, - { - "__id__": 35 - }, - { - "__id__": 36 - }, - { - "__id__": 38 - } - ], - "removedComponents": [] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 32 - }, - "propertyPath": [ - "_name" - ], - "value": "Obstacle" - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "a0kYAhzm5AAa3h8r/fe/j5" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 32 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 32 - }, - "propertyPath": [ - "_lrot" - ], - "value": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": -0.7071067811865475, - "w": 0.7071067811865476 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 32 - }, - "propertyPath": [ - "_euler" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": -90 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 37 - }, - "propertyPath": [ - "_restitution" - ], - "value": 0.3 - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "7egu3Zm5tHjb52E6fmax1G" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 37 - }, - "propertyPath": [ - "_friction" - ], - "value": 2 - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 40 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 100, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "95+Xig555LLYmKXCqZB+hR" - }, - { - "__type__": "c8e705yAJlBEKcUg/gyt/xJ", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 42 - }, - "targets": [ - { - "__id__": 6 - }, - { - "__id__": 17 - }, - { - "__id__": 28 - } - ], - "waypoints": [ - { - "__id__": 4 - }, - { - "__id__": 2 - } - ], - "speed": 1, - "selectedObstacle": null, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "9d9KKHmPlB6JUx7ketBzxb" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "8bAB5AG0pEMal3JgTX45pf", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": [ - { - "__id__": 28 - }, - { - "__id__": 17 - }, - { - "__id__": 6 - } - ] - } -] \ No newline at end of file diff --git a/assets/_Game/Prefabs/Obstacles/Easy Obstacle 1.prefab.meta b/assets/_Game/Prefabs/Obstacles/Easy Obstacle 1.prefab.meta deleted file mode 100644 index 1dfc635..0000000 --- a/assets/_Game/Prefabs/Obstacles/Easy Obstacle 1.prefab.meta +++ /dev/null @@ -1,13 +0,0 @@ -{ - "ver": "1.1.43", - "importer": "prefab", - "imported": true, - "uuid": "f30b309a-4220-4c22-b3d5-ac450258eb77", - "files": [ - ".json" - ], - "subMetas": {}, - "userData": { - "syncNodeName": "Easy Obstacle 1" - } -} diff --git a/assets/_Game/Prefabs/Obstacles/Easy Obstacle 2.prefab b/assets/_Game/Prefabs/Obstacles/Easy Obstacle 2.prefab deleted file mode 100644 index f2f2aa4..0000000 --- a/assets/_Game/Prefabs/Obstacles/Easy Obstacle 2.prefab +++ /dev/null @@ -1,697 +0,0 @@ -[ - { - "__type__": "cc.Prefab", - "_name": "Easy Obstacle 2", - "_objFlags": 0, - "_native": "", - "data": { - "__id__": 1 - }, - "optimizationPolicy": 0, - "persistent": false - }, - { - "__type__": "cc.Node", - "_name": "Easy Obstacle 2", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": null, - "_children": [ - { - "__id__": 2 - }, - { - "__id__": 4 - }, - { - "__id__": 6 - }, - { - "__id__": 17 - }, - { - "__id__": 28 - } - ], - "_active": true, - "_components": [ - { - "__id__": 39 - }, - { - "__id__": 41 - } - ], - "_prefab": { - "__id__": 43 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 200, - "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": "" - }, - { - "__type__": "cc.Node", - "_name": "Waypoint L", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_children": [], - "_active": true, - "_components": [], - "_prefab": { - "__id__": 3 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": -60, - "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": "" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "de8VqIuyVFIJIRj77PlLqI", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.Node", - "_name": "Waypoint R", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_children": [], - "_active": true, - "_components": [], - "_prefab": { - "__id__": 5 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": 60, - "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": "" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "8ezI4xD7dPB7nmq1CTcPMa", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.Node", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_prefab": { - "__id__": 7 - }, - "__editorExtras__": {} - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 6 - }, - "asset": { - "__uuid__": "f49ff774-8d49-42fd-81de-aeb7f53d03f5", - "__expectedType__": "cc.Prefab" - }, - "fileId": "a0kYAhzm5AAa3h8r/fe/j5", - "instance": { - "__id__": 8 - }, - "targetOverrides": null - }, - { - "__type__": "cc.PrefabInstance", - "fileId": "d5MUuJhTtHPqoYxWAJkdvs", - "prefabRootNode": { - "__id__": 1 - }, - "mountedChildren": [], - "mountedComponents": [], - "propertyOverrides": [ - { - "__id__": 9 - }, - { - "__id__": 11 - }, - { - "__id__": 12 - }, - { - "__id__": 13 - }, - { - "__id__": 14 - }, - { - "__id__": 16 - } - ], - "removedComponents": [] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 10 - }, - "propertyPath": [ - "_name" - ], - "value": "Obstacle" - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "a0kYAhzm5AAa3h8r/fe/j5" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 10 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": 60, - "y": -90, - "z": 0 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 10 - }, - "propertyPath": [ - "_lrot" - ], - "value": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": -0.7071067811865475, - "w": 0.7071067811865476 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 10 - }, - "propertyPath": [ - "_euler" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": -90 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 15 - }, - "propertyPath": [ - "_friction" - ], - "value": 2 - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "7egu3Zm5tHjb52E6fmax1G" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 15 - }, - "propertyPath": [ - "_restitution" - ], - "value": 0.3 - }, - { - "__type__": "cc.Node", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_prefab": { - "__id__": 18 - }, - "__editorExtras__": {} - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 17 - }, - "asset": { - "__uuid__": "f49ff774-8d49-42fd-81de-aeb7f53d03f5", - "__expectedType__": "cc.Prefab" - }, - "fileId": "a0kYAhzm5AAa3h8r/fe/j5", - "instance": { - "__id__": 19 - }, - "targetOverrides": null - }, - { - "__type__": "cc.PrefabInstance", - "fileId": "e1NT6f+hhFro0n3pDSh9q8", - "prefabRootNode": { - "__id__": 1 - }, - "mountedChildren": [], - "mountedComponents": [], - "propertyOverrides": [ - { - "__id__": 20 - }, - { - "__id__": 22 - }, - { - "__id__": 23 - }, - { - "__id__": 24 - }, - { - "__id__": 25 - }, - { - "__id__": 27 - } - ], - "removedComponents": [] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 21 - }, - "propertyPath": [ - "_name" - ], - "value": "Obstacle" - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "a0kYAhzm5AAa3h8r/fe/j5" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 21 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": 60, - "y": -170, - "z": 0 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 21 - }, - "propertyPath": [ - "_lrot" - ], - "value": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": -0.7071067811865475, - "w": 0.7071067811865476 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 21 - }, - "propertyPath": [ - "_euler" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": -90 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 26 - }, - "propertyPath": [ - "_friction" - ], - "value": 2 - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "7egu3Zm5tHjb52E6fmax1G" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 26 - }, - "propertyPath": [ - "_restitution" - ], - "value": 0.3 - }, - { - "__type__": "cc.Node", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_prefab": { - "__id__": 29 - }, - "__editorExtras__": {} - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 28 - }, - "asset": { - "__uuid__": "f49ff774-8d49-42fd-81de-aeb7f53d03f5", - "__expectedType__": "cc.Prefab" - }, - "fileId": "a0kYAhzm5AAa3h8r/fe/j5", - "instance": { - "__id__": 30 - }, - "targetOverrides": null - }, - { - "__type__": "cc.PrefabInstance", - "fileId": "80I6iQCNhH2LFLQwLhSOR/", - "prefabRootNode": { - "__id__": 1 - }, - "mountedChildren": [], - "mountedComponents": [], - "propertyOverrides": [ - { - "__id__": 31 - }, - { - "__id__": 33 - }, - { - "__id__": 34 - }, - { - "__id__": 35 - }, - { - "__id__": 36 - }, - { - "__id__": 38 - } - ], - "removedComponents": [] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 32 - }, - "propertyPath": [ - "_name" - ], - "value": "Obstacle" - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "a0kYAhzm5AAa3h8r/fe/j5" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 32 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": 60, - "y": -250, - "z": 0 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 32 - }, - "propertyPath": [ - "_lrot" - ], - "value": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": -0.7071067811865475, - "w": 0.7071067811865476 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 32 - }, - "propertyPath": [ - "_euler" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": -90 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 37 - }, - "propertyPath": [ - "_friction" - ], - "value": 2 - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "7egu3Zm5tHjb52E6fmax1G" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 37 - }, - "propertyPath": [ - "_restitution" - ], - "value": 0.3 - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 40 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 100, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "95+Xig555LLYmKXCqZB+hR" - }, - { - "__type__": "c8e705yAJlBEKcUg/gyt/xJ", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 42 - }, - "targets": [], - "waypoints": [ - { - "__id__": 4 - }, - { - "__id__": 2 - } - ], - "speed": 1, - "selectedObstacle": null, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "9d9KKHmPlB6JUx7ketBzxb" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "8bAB5AG0pEMal3JgTX45pf", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": [ - { - "__id__": 28 - }, - { - "__id__": 17 - }, - { - "__id__": 6 - } - ] - } -] \ No newline at end of file diff --git a/assets/_Game/Prefabs/Obstacles/Easy Obstacle 2.prefab.meta b/assets/_Game/Prefabs/Obstacles/Easy Obstacle 2.prefab.meta deleted file mode 100644 index edff7ac..0000000 --- a/assets/_Game/Prefabs/Obstacles/Easy Obstacle 2.prefab.meta +++ /dev/null @@ -1,13 +0,0 @@ -{ - "ver": "1.1.43", - "importer": "prefab", - "imported": true, - "uuid": "36df1e3d-a2ea-4b8d-8a5c-fc97275927ed", - "files": [ - ".json" - ], - "subMetas": {}, - "userData": { - "syncNodeName": "Easy Obstacle 2" - } -} diff --git a/assets/_Game/Prefabs/Obstacles/Easy Obstacle 3.prefab b/assets/_Game/Prefabs/Obstacles/Easy Obstacle 3.prefab deleted file mode 100644 index 079af92..0000000 --- a/assets/_Game/Prefabs/Obstacles/Easy Obstacle 3.prefab +++ /dev/null @@ -1,701 +0,0 @@ -[ - { - "__type__": "cc.Prefab", - "_name": "Easy Obstacle 3", - "_objFlags": 0, - "_native": "", - "data": { - "__id__": 1 - }, - "optimizationPolicy": 0, - "persistent": false - }, - { - "__type__": "cc.Node", - "_name": "Easy Obstacle 3", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": null, - "_children": [ - { - "__id__": 2 - }, - { - "__id__": 4 - }, - { - "__id__": 6 - }, - { - "__id__": 17 - }, - { - "__id__": 28 - } - ], - "_active": true, - "_components": [ - { - "__id__": 39 - }, - { - "__id__": 41 - } - ], - "_prefab": { - "__id__": 43 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 200, - "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": "" - }, - { - "__type__": "cc.Node", - "_name": "Waypoint L", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_children": [], - "_active": true, - "_components": [], - "_prefab": { - "__id__": 3 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": -60, - "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": "" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "de8VqIuyVFIJIRj77PlLqI", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.Node", - "_name": "Waypoint R", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_children": [], - "_active": true, - "_components": [], - "_prefab": { - "__id__": 5 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": 60, - "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": "" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "8ezI4xD7dPB7nmq1CTcPMa", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.Node", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_prefab": { - "__id__": 7 - }, - "__editorExtras__": {} - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 6 - }, - "asset": { - "__uuid__": "f49ff774-8d49-42fd-81de-aeb7f53d03f5", - "__expectedType__": "cc.Prefab" - }, - "fileId": "a0kYAhzm5AAa3h8r/fe/j5", - "instance": { - "__id__": 8 - }, - "targetOverrides": null - }, - { - "__type__": "cc.PrefabInstance", - "fileId": "d5MUuJhTtHPqoYxWAJkdvs", - "prefabRootNode": { - "__id__": 1 - }, - "mountedChildren": [], - "mountedComponents": [], - "propertyOverrides": [ - { - "__id__": 9 - }, - { - "__id__": 11 - }, - { - "__id__": 12 - }, - { - "__id__": 13 - }, - { - "__id__": 14 - }, - { - "__id__": 16 - } - ], - "removedComponents": [] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 10 - }, - "propertyPath": [ - "_name" - ], - "value": "Obstacle" - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "a0kYAhzm5AAa3h8r/fe/j5" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 10 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": -120, - "y": 120, - "z": 0 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 10 - }, - "propertyPath": [ - "_lrot" - ], - "value": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": -0.7071067811865475, - "w": 0.7071067811865476 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 10 - }, - "propertyPath": [ - "_euler" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": -90 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 15 - }, - "propertyPath": [ - "_restitution" - ], - "value": 0.3 - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "7egu3Zm5tHjb52E6fmax1G" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 15 - }, - "propertyPath": [ - "_friction" - ], - "value": 2 - }, - { - "__type__": "cc.Node", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_prefab": { - "__id__": 18 - }, - "__editorExtras__": {} - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 17 - }, - "asset": { - "__uuid__": "f49ff774-8d49-42fd-81de-aeb7f53d03f5", - "__expectedType__": "cc.Prefab" - }, - "fileId": "a0kYAhzm5AAa3h8r/fe/j5", - "instance": { - "__id__": 19 - }, - "targetOverrides": null - }, - { - "__type__": "cc.PrefabInstance", - "fileId": "e1NT6f+hhFro0n3pDSh9q8", - "prefabRootNode": { - "__id__": 1 - }, - "mountedChildren": [], - "mountedComponents": [], - "propertyOverrides": [ - { - "__id__": 20 - }, - { - "__id__": 22 - }, - { - "__id__": 23 - }, - { - "__id__": 24 - }, - { - "__id__": 25 - }, - { - "__id__": 27 - } - ], - "removedComponents": [] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 21 - }, - "propertyPath": [ - "_name" - ], - "value": "Obstacle" - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "a0kYAhzm5AAa3h8r/fe/j5" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 21 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": -60, - "y": -20, - "z": 0 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 21 - }, - "propertyPath": [ - "_lrot" - ], - "value": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": -0.7071067811865475, - "w": 0.7071067811865476 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 21 - }, - "propertyPath": [ - "_euler" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": -90 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 26 - }, - "propertyPath": [ - "_restitution" - ], - "value": 0.3 - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "7egu3Zm5tHjb52E6fmax1G" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 26 - }, - "propertyPath": [ - "_friction" - ], - "value": 2 - }, - { - "__type__": "cc.Node", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_prefab": { - "__id__": 29 - }, - "__editorExtras__": {} - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 28 - }, - "asset": { - "__uuid__": "f49ff774-8d49-42fd-81de-aeb7f53d03f5", - "__expectedType__": "cc.Prefab" - }, - "fileId": "a0kYAhzm5AAa3h8r/fe/j5", - "instance": { - "__id__": 30 - }, - "targetOverrides": null - }, - { - "__type__": "cc.PrefabInstance", - "fileId": "80I6iQCNhH2LFLQwLhSOR/", - "prefabRootNode": { - "__id__": 1 - }, - "mountedChildren": [], - "mountedComponents": [], - "propertyOverrides": [ - { - "__id__": 31 - }, - { - "__id__": 33 - }, - { - "__id__": 34 - }, - { - "__id__": 35 - }, - { - "__id__": 36 - }, - { - "__id__": 38 - } - ], - "removedComponents": [] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 32 - }, - "propertyPath": [ - "_name" - ], - "value": "Obstacle" - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "a0kYAhzm5AAa3h8r/fe/j5" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 32 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": -50, - "y": -150, - "z": 0 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 32 - }, - "propertyPath": [ - "_lrot" - ], - "value": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": -0.7071067811865475, - "w": 0.7071067811865476 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 32 - }, - "propertyPath": [ - "_euler" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": -90 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 37 - }, - "propertyPath": [ - "_restitution" - ], - "value": 0.3 - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "7egu3Zm5tHjb52E6fmax1G" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 37 - }, - "propertyPath": [ - "_friction" - ], - "value": 2 - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 40 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 100, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "95+Xig555LLYmKXCqZB+hR" - }, - { - "__type__": "c8e705yAJlBEKcUg/gyt/xJ", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 42 - }, - "targets": [ - { - "__id__": 17 - } - ], - "waypoints": [ - { - "__id__": 4 - }, - { - "__id__": 2 - } - ], - "speed": 1, - "selectedObstacle": null, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "9d9KKHmPlB6JUx7ketBzxb" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "8bAB5AG0pEMal3JgTX45pf", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": [ - { - "__id__": 28 - }, - { - "__id__": 17 - }, - { - "__id__": 6 - } - ] - } -] \ No newline at end of file diff --git a/assets/_Game/Prefabs/Obstacles/Easy Obstacle 3.prefab.meta b/assets/_Game/Prefabs/Obstacles/Easy Obstacle 3.prefab.meta deleted file mode 100644 index 53ff19a..0000000 --- a/assets/_Game/Prefabs/Obstacles/Easy Obstacle 3.prefab.meta +++ /dev/null @@ -1,13 +0,0 @@ -{ - "ver": "1.1.43", - "importer": "prefab", - "imported": true, - "uuid": "1f197242-be22-45c5-8050-73114637003e", - "files": [ - ".json" - ], - "subMetas": {}, - "userData": { - "syncNodeName": "Easy Obstacle 3" - } -} diff --git a/assets/_Game/Prefabs/Obstacles/Obstacle.prefab b/assets/_Game/Prefabs/Obstacles/Obstacle.prefab deleted file mode 100644 index 100d86a..0000000 --- a/assets/_Game/Prefabs/Obstacles/Obstacle.prefab +++ /dev/null @@ -1,216 +0,0 @@ -[ - { - "__type__": "cc.Prefab", - "_name": "Obstacle", - "_objFlags": 0, - "_native": "", - "data": { - "__id__": 1 - }, - "optimizationPolicy": 0, - "persistent": false - }, - { - "__type__": "cc.Node", - "_name": "Obstacle", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": null, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 2 - }, - { - "__id__": 4 - }, - { - "__id__": 6 - }, - { - "__id__": 8 - } - ], - "_prefab": { - "__id__": 10 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": -175, - "y": 380, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": -0.7071067811865475, - "w": 0.7071067811865476 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": -90 - }, - "_id": "" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 3 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 21, - "height": 31 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "45QTNNbC9OUYDRRzKHu6WV" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 5 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "8bc52c2c-7db5-4951-9bf1-a38f1914bf0e@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": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "08nypWEwZI2pSnaYoRCRKW" - }, - { - "__type__": "cc.BoxCollider2D", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 7 - }, - "tag": 3, - "_group": 1, - "_density": 1, - "_sensor": false, - "_friction": 0.2, - "_restitution": 0, - "_offset": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_size": { - "__type__": "cc.Size", - "width": 20, - "height": 32 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "7egu3Zm5tHjb52E6fmax1G" - }, - { - "__type__": "cc.RigidBody2D", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 9 - }, - "enabledContactListener": false, - "bullet": false, - "awakeOnLoad": false, - "_group": 1, - "_type": 0, - "_allowSleep": true, - "_gravityScale": 0, - "_linearDamping": 0, - "_angularDamping": 0, - "_linearVelocity": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_angularVelocity": 0, - "_fixedRotation": true, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "39ENf+Cn1O95ZEF7CNhWT+" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "a0kYAhzm5AAa3h8r/fe/j5", - "instance": null, - "targetOverrides": null - } -] \ No newline at end of file diff --git a/assets/_Game/Prefabs/Obstacles/Obstacle.prefab.meta b/assets/_Game/Prefabs/Obstacles/Obstacle.prefab.meta deleted file mode 100644 index a7cbd84..0000000 --- a/assets/_Game/Prefabs/Obstacles/Obstacle.prefab.meta +++ /dev/null @@ -1,13 +0,0 @@ -{ - "ver": "1.1.43", - "importer": "prefab", - "imported": true, - "uuid": "f49ff774-8d49-42fd-81de-aeb7f53d03f5", - "files": [ - ".json" - ], - "subMetas": {}, - "userData": { - "syncNodeName": "Obstacle" - } -} diff --git a/assets/_Game/Scenes/EndLessScene.scene b/assets/_Game/Scenes/EndLessScene.scene index 4644c9d..5bee36e 100644 --- a/assets/_Game/Scenes/EndLessScene.scene +++ b/assets/_Game/Scenes/EndLessScene.scene @@ -22,7 +22,7 @@ "_active": true, "_components": [], "_prefab": { - "__id__": 201 + "__id__": 204 }, "_lpos": { "__type__": "cc.Vec3", @@ -53,7 +53,7 @@ }, "autoReleaseAssets": false, "_globals": { - "__id__": 205 + "__id__": 208 }, "_id": "82e6ef2e-3f9c-4d4e-ab02-dc963e925b88" }, @@ -76,13 +76,13 @@ "_active": true, "_components": [ { - "__id__": 198 + "__id__": 201 }, { - "__id__": 199 + "__id__": 202 }, { - "__id__": 200 + "__id__": 203 } ], "_prefab": null, @@ -226,31 +226,34 @@ "__id__": 98 }, { - "__id__": 106 + "__id__": 107 }, { - "__id__": 114 + "__id__": 116 }, { - "__id__": 119 + "__id__": 121 }, { - "__id__": 124 + "__id__": 126 }, { - "__id__": 128 + "__id__": 130 }, { - "__id__": 132 + "__id__": 134 }, { - "__id__": 136 + "__id__": 138 } ], "_active": true, "_components": [ { - "__id__": 197 + "__id__": 199 + }, + { + "__id__": 200 } ], "_prefab": null, @@ -1493,7 +1496,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": -431, - "y": -620, + "y": -618.906, "z": 1 }, "_lrot": { @@ -1752,7 +1755,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": -188.84, - "y": -153.721, + "y": -152.035, "z": 0 }, "_lrot": { @@ -4017,6 +4020,9 @@ "_components": [ { "__id__": 102 + }, + { + "__id__": 106 } ], "_prefab": null, @@ -4328,6 +4334,23 @@ "_atlas": null, "_id": "08JpJhOjVFGYctYs3Lk/Dc" }, + { + "__type__": "3bf75rsU/hBsbSQ4K5735eY", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 98 + }, + "_enabled": true, + "__prefab": null, + "_hingeJoint": { + "__id__": 101 + }, + "_motorSpeedActive": -10000, + "_motorSpeedDeActive": 10000, + "side": 0, + "_id": "2fOK1FDYxPabzzS0MpBt/t" + }, { "__type__": "cc.Node", "_name": "Sick holder R", @@ -4338,13 +4361,16 @@ }, "_children": [ { - "__id__": 107 + "__id__": 108 } ], "_active": true, "_components": [ { - "__id__": 110 + "__id__": 111 + }, + { + "__id__": 115 } ], "_prefab": null, @@ -4383,25 +4409,25 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 106 + "__id__": 107 }, "_children": [], "_active": true, "_components": [ - { - "__id__": 108 - }, { "__id__": 109 }, { - "__id__": 111 + "__id__": 110 }, { "__id__": 112 }, { "__id__": 113 + }, + { + "__id__": 114 } ], "_prefab": null, @@ -4440,7 +4466,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 107 + "__id__": 108 }, "_enabled": true, "__prefab": null, @@ -4468,7 +4494,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 107 + "__id__": 108 }, "_enabled": true, "__prefab": null, @@ -4484,7 +4510,7 @@ }, "collideConnected": false, "connectedBody": { - "__id__": 110 + "__id__": 111 }, "_enableLimit": true, "_lowerAngle": -30, @@ -4500,7 +4526,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 106 + "__id__": 107 }, "_enabled": true, "__prefab": null, @@ -4528,7 +4554,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 107 + "__id__": 108 }, "_enabled": true, "__prefab": null, @@ -4602,7 +4628,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 107 + "__id__": 108 }, "_enabled": true, "__prefab": null, @@ -4623,7 +4649,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 107 + "__id__": 108 }, "_enabled": true, "__prefab": null, @@ -4656,6 +4682,23 @@ "_atlas": null, "_id": "2az6WrLkxO74/iMWEYCPhe" }, + { + "__type__": "3bf75rsU/hBsbSQ4K5735eY", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 107 + }, + "_enabled": true, + "__prefab": null, + "_hingeJoint": { + "__id__": 110 + }, + "_motorSpeedActive": 10000, + "_motorSpeedDeActive": -10000, + "side": 1, + "_id": "f3Zm6LRBtN3oddRlTNBhb9" + }, { "__type__": "cc.Node", "_name": "slingshot", @@ -4666,17 +4709,17 @@ "_children": [], "_active": true, "_components": [ - { - "__id__": 115 - }, - { - "__id__": 116 - }, { "__id__": 117 }, { "__id__": 118 + }, + { + "__id__": 119 + }, + { + "__id__": 120 } ], "_prefab": null, @@ -4714,7 +4757,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 114 + "__id__": 116 }, "_enabled": true, "__prefab": null, @@ -4735,7 +4778,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 114 + "__id__": 116 }, "_enabled": true, "__prefab": null, @@ -4773,7 +4816,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 114 + "__id__": 116 }, "_enabled": true, "__prefab": null, @@ -4847,7 +4890,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 114 + "__id__": 116 }, "_enabled": true, "__prefab": null, @@ -4879,17 +4922,17 @@ "_children": [], "_active": true, "_components": [ - { - "__id__": 120 - }, - { - "__id__": 121 - }, { "__id__": 122 }, { "__id__": 123 + }, + { + "__id__": 124 + }, + { + "__id__": 125 } ], "_prefab": null, @@ -4927,7 +4970,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 119 + "__id__": 121 }, "_enabled": true, "__prefab": null, @@ -4948,7 +4991,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 119 + "__id__": 121 }, "_enabled": true, "__prefab": null, @@ -4986,7 +5029,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 119 + "__id__": 121 }, "_enabled": true, "__prefab": null, @@ -5060,7 +5103,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 119 + "__id__": 121 }, "_enabled": true, "__prefab": null, @@ -5092,14 +5135,14 @@ "_children": [], "_active": true, "_components": [ - { - "__id__": 125 - }, - { - "__id__": 126 - }, { "__id__": 127 + }, + { + "__id__": 128 + }, + { + "__id__": 129 } ], "_prefab": null, @@ -5137,7 +5180,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 124 + "__id__": 126 }, "_enabled": true, "__prefab": null, @@ -5158,7 +5201,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 124 + "__id__": 126 }, "_enabled": true, "__prefab": null, @@ -5196,7 +5239,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 124 + "__id__": 126 }, "_enabled": true, "__prefab": null, @@ -5275,14 +5318,14 @@ "_children": [], "_active": true, "_components": [ - { - "__id__": 129 - }, - { - "__id__": 130 - }, { "__id__": 131 + }, + { + "__id__": 132 + }, + { + "__id__": 133 } ], "_prefab": null, @@ -5320,7 +5363,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 128 + "__id__": 130 }, "_enabled": true, "__prefab": null, @@ -5341,7 +5384,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 128 + "__id__": 130 }, "_enabled": true, "__prefab": null, @@ -5379,7 +5422,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 128 + "__id__": 130 }, "_enabled": true, "__prefab": null, @@ -5458,14 +5501,14 @@ "_children": [], "_active": true, "_components": [ - { - "__id__": 133 - }, - { - "__id__": 134 - }, { "__id__": 135 + }, + { + "__id__": 136 + }, + { + "__id__": 137 } ], "_prefab": null, @@ -5503,7 +5546,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 132 + "__id__": 134 }, "_enabled": true, "__prefab": null, @@ -5524,7 +5567,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 132 + "__id__": 134 }, "_enabled": true, "__prefab": null, @@ -5551,7 +5594,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 132 + "__id__": 134 }, "_enabled": true, "__prefab": null, @@ -5580,14 +5623,14 @@ "__id__": 5 }, "_prefab": { - "__id__": 137 + "__id__": 139 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 136 + "__id__": 138 }, "asset": { "__uuid__": "f54a7c19-37d5-4255-9336-f6df0e956be7", @@ -5595,7 +5638,7 @@ }, "fileId": "65yusfkDBDE68dh4sqPVS4", "instance": { - "__id__": 138 + "__id__": 140 }, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -5607,15 +5650,9 @@ "mountedChildren": [], "mountedComponents": [], "propertyOverrides": [ - { - "__id__": 139 - }, { "__id__": 141 }, - { - "__id__": 142 - }, { "__id__": 143 }, @@ -5629,10 +5666,10 @@ "__id__": 146 }, { - "__id__": 148 + "__id__": 147 }, { - "__id__": 149 + "__id__": 148 }, { "__id__": 150 @@ -5736,6 +5773,9 @@ { "__id__": 183 }, + { + "__id__": 184 + }, { "__id__": 185 }, @@ -5755,7 +5795,10 @@ "__id__": 195 }, { - "__id__": 196 + "__id__": 197 + }, + { + "__id__": 198 } ], "removedComponents": [] @@ -5763,7 +5806,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 140 + "__id__": 142 }, "propertyPath": [ "_name" @@ -5779,7 +5822,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 140 + "__id__": 142 }, "propertyPath": [ "_lpos" @@ -5794,7 +5837,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 140 + "__id__": 142 }, "propertyPath": [ "_lrot" @@ -5810,7 +5853,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 140 + "__id__": 142 }, "propertyPath": [ "_euler" @@ -5825,7 +5868,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 140 + "__id__": 142 }, "propertyPath": [ "_active" @@ -5835,7 +5878,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 140 + "__id__": 142 }, "propertyPath": [ "_lscale" @@ -5850,7 +5893,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startSizeX", @@ -5867,7 +5910,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startSizeX", @@ -5878,7 +5921,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startSizeY", @@ -5889,7 +5932,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startSizeY", @@ -5900,7 +5943,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "_shapeModule", @@ -5911,7 +5954,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "duration" @@ -5921,7 +5964,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "bursts", @@ -5933,7 +5976,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "gravityModifier", @@ -5944,7 +5987,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "_materials", @@ -5955,7 +5998,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "_materials", @@ -5966,7 +6009,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "renderer", @@ -5977,7 +6020,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "_materials", @@ -5991,7 +6034,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "renderer", @@ -6005,7 +6048,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "renderer", @@ -6016,7 +6059,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startRotationX", @@ -6027,7 +6070,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startRotationY", @@ -6038,7 +6081,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startRotationZ", @@ -6049,7 +6092,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "_velocityOvertimeModule", @@ -6060,7 +6103,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "_velocityOvertimeModule", @@ -6072,7 +6115,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "_velocityOvertimeModule", @@ -6084,7 +6127,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "_velocityOvertimeModule", @@ -6096,7 +6139,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "_forceOvertimeModule", @@ -6107,7 +6150,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "_forceOvertimeModule", @@ -6119,7 +6162,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "_rotationOvertimeModule", @@ -6130,7 +6173,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "_rotationOvertimeModule", @@ -6142,7 +6185,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "_rotationOvertimeModule", @@ -6153,7 +6196,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "_rotationOvertimeModule", @@ -6165,7 +6208,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "_rotationOvertimeModule", @@ -6177,7 +6220,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "loop" @@ -6187,7 +6230,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "playOnAwake" @@ -6197,7 +6240,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startColor", @@ -6208,7 +6251,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startColor", @@ -6221,7 +6264,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startColor", @@ -6241,7 +6284,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startColor", @@ -6255,7 +6298,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startColor", @@ -6275,7 +6318,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startColor", @@ -6289,7 +6332,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startColor", @@ -6298,7 +6341,7 @@ "3" ], "value": { - "__id__": 184 + "__id__": 186 } }, { @@ -6315,7 +6358,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startColor", @@ -6324,7 +6367,7 @@ "4" ], "value": { - "__id__": 186 + "__id__": 188 } }, { @@ -6341,7 +6384,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startColor", @@ -6350,7 +6393,7 @@ "5" ], "value": { - "__id__": 188 + "__id__": 190 } }, { @@ -6367,7 +6410,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startColor", @@ -6376,7 +6419,7 @@ "6" ], "value": { - "__id__": 190 + "__id__": 192 } }, { @@ -6393,7 +6436,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startColor", @@ -6401,32 +6444,6 @@ "colorKeys", "7" ], - "value": { - "__id__": 192 - } - }, - { - "__type__": "cc.ColorKey", - "color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "time": 0.7522321428571429 - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 147 - }, - "propertyPath": [ - "startColor", - "gradient", - "colorKeys", - "8" - ], "value": { "__id__": 194 } @@ -6445,7 +6462,33 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 + }, + "propertyPath": [ + "startColor", + "gradient", + "colorKeys", + "8" + ], + "value": { + "__id__": 196 + } + }, + { + "__type__": "cc.ColorKey", + "color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "time": 0.7522321428571429 + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 149 }, "propertyPath": [ "startColor", @@ -6465,7 +6508,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 147 + "__id__": 149 }, "propertyPath": [ "startColor", @@ -6498,6 +6541,21 @@ }, "_id": "79IdOCQ/dEzoI70UU/heUu" }, + { + "__type__": "85b9aaRsZBAn5sUxS5RQ3EF", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "__prefab": null, + "_ballPrefab": { + "__uuid__": "9b471c78-2e1d-4db8-ab08-b3df7c938d64", + "__expectedType__": "cc.Prefab" + }, + "_id": "94qg9r7nVDkbO1S3Aid8/t" + }, { "__type__": "cc.UITransform", "_name": "", @@ -6574,32 +6632,32 @@ "instance": null, "targetOverrides": [ { - "__id__": 202 + "__id__": 205 } ], "nestedPrefabInstanceRoots": [ { - "__id__": 136 + "__id__": 138 } ] }, { "__type__": "cc.TargetOverrideInfo", "source": { - "__id__": 136 + "__id__": 138 }, "sourceInfo": { - "__id__": 203 + "__id__": 206 }, "propertyPath": [ "_trailModule", "_particleSystem" ], "target": { - "__id__": 136 + "__id__": 138 }, "targetInfo": { - "__id__": 204 + "__id__": 207 } }, { @@ -6617,23 +6675,23 @@ { "__type__": "cc.SceneGlobals", "ambient": { - "__id__": 206 - }, - "shadows": { - "__id__": 207 - }, - "_skybox": { - "__id__": 208 - }, - "fog": { "__id__": 209 }, - "octree": { + "shadows": { "__id__": 210 }, - "lightProbeInfo": { + "_skybox": { "__id__": 211 }, + "fog": { + "__id__": 212 + }, + "octree": { + "__id__": 213 + }, + "lightProbeInfo": { + "__id__": 214 + }, "bakedWithStationaryMainLight": false, "bakedWithHighpLightmap": false }, diff --git a/assets/_Game/Scripts/Gameplay/Flipper.ts b/assets/_Game/Scripts/Gameplay/Flipper.ts index 759c62b..c38d0f5 100644 --- a/assets/_Game/Scripts/Gameplay/Flipper.ts +++ b/assets/_Game/Scripts/Gameplay/Flipper.ts @@ -1,19 +1,105 @@ -import { _decorator, Component, HingeJoint2D, Node, input, Input, EventMouse, CCFloat } from 'cc'; +import { + _decorator, + Component, + HingeJoint2D, + input, + CCFloat, + Input, + EventKeyboard, + KeyCode, + Enum, + EventTouch, + screen, +} from 'cc'; const { ccclass, property } = _decorator; +enum ControllerSide { + Left, + Right, +} + +Enum(ControllerSide); + @ccclass('Flipper') export class Flipper extends Component { @property({ visible: true, type: HingeJoint2D }) - public _hingeJoint: HingeJoint2D; + private _hingeJoint: HingeJoint2D; @property({ visible: true, type: CCFloat }) - public _motorSpeedActive: number; + private _motorSpeedActive: number; @property({ visible: true, type: CCFloat }) - public _motorSpeedDeActive: number; + private _motorSpeedDeActive: number; + @property({ visible: true, type: ControllerSide }) + private side = ControllerSide.Left; - public activeFlipper(): void { + protected onLoad(): void { + input.on(Input.EventType.KEY_DOWN, this.onKeyInputDown, this); + input.on(Input.EventType.KEY_UP, this.onKeyInputUp, this); + input.on(Input.EventType.TOUCH_START, this.onTouchStart, this); + input.on(Input.EventType.TOUCH_END, this.onTouchEnd, this); + } + + //#region Input Handler + + private onKeyInputDown(event: EventKeyboard) { + switch (event.keyCode) { + case KeyCode.KEY_A: + case KeyCode.ARROW_LEFT: + if (this.side == ControllerSide.Left) this.activeFlipper(); + break; + case KeyCode.KEY_D: + case KeyCode.ARROW_RIGHT: + if (this.side == ControllerSide.Right) this.activeFlipper(); + break; + default: + break; + } + } + + private onKeyInputUp(event: EventKeyboard) { + switch (event.keyCode) { + case KeyCode.KEY_A: + case KeyCode.ARROW_LEFT: + if (this.side == ControllerSide.Left) this.deActiveFlipper(); + break; + case KeyCode.KEY_D: + case KeyCode.ARROW_RIGHT: + if (this.side == ControllerSide.Right) this.deActiveFlipper(); + break; + default: + break; + } + } + + private onTouchStart(event: EventTouch) { + if (event.getLocationX() > screen.windowSize.x / 2) { + if (this.side == ControllerSide.Right) { + this.activeFlipper(); + } + } else { + if (this.side == ControllerSide.Left) { + this.activeFlipper(); + } + } + } + + private onTouchEnd(event: EventTouch) { + if (event.getLocationX() > screen.windowSize.x / 2) { + if (this.side == ControllerSide.Right) { + this.deActiveFlipper(); + } + } else { + if (this.side == ControllerSide.Left) { + this.deActiveFlipper(); + } + } + } + + //#endregion + + private activeFlipper(): void { this._hingeJoint.motorSpeed = this._motorSpeedActive; } - public deActiveFlipper(): void { + private deActiveFlipper(): void { this._hingeJoint.motorSpeed = this._motorSpeedDeActive; } } diff --git a/assets/_Game/Scripts/Manager/GameManager.ts b/assets/_Game/Scripts/Manager/GameManager.ts index 50f4b83..9018d88 100644 --- a/assets/_Game/Scripts/Manager/GameManager.ts +++ b/assets/_Game/Scripts/Manager/GameManager.ts @@ -1,4 +1,6 @@ -import { _decorator, Component, Node } from 'cc'; +import { _decorator, Component, Prefab } from 'cc'; +import ObjectPool from '../Pool/ObjectPool'; +import Utilities from '../Utilities/Utilities'; const { ccclass, property } = _decorator; @ccclass('GameManager') @@ -9,9 +11,25 @@ export class GameManager extends Component { return GameManager._instance; } + @property({ type: Prefab, visible: true }) + private _ballPrefab: Prefab; + private _ballPool: ObjectPool; + public highestStreak: number; public score = 0; + protected onLoad(): void { + this._ballPool = new ObjectPool(this._ballPrefab, 10, false); + } + + protected async start() { + while (true) { + const ball = this._ballPool.get(this.node); + ball.setWorldPosition(this.node.worldPosition); + await Utilities.delay(1000); + } + } + public onRevive() { throw new Error('Method not implemented.'); } diff --git a/assets/_Game/Scripts/Pool/Pool.ts b/assets/_Game/Scripts/Pool/ObjectPool.ts similarity index 52% rename from assets/_Game/Scripts/Pool/Pool.ts rename to assets/_Game/Scripts/Pool/ObjectPool.ts index b9b2ada..1719dfa 100644 --- a/assets/_Game/Scripts/Pool/Pool.ts +++ b/assets/_Game/Scripts/Pool/ObjectPool.ts @@ -1,9 +1,8 @@ import { Component, Node, Prefab, __private, director, instantiate } from 'cc'; -export default class ObjectPool { +export default class ObjectPool { private _inactives: Node[] = []; private _actives: Node[] = []; - private _classConstructor: string; private _prefab: Prefab; private _expandable; @@ -19,8 +18,7 @@ export default class ObjectPool { return this.countInactive + this.countActive; } - constructor(classConstructor: string, prefab: Prefab, size: number, expandable = true) { - this._classConstructor = classConstructor; + constructor(prefab: Prefab, size: number, expandable = true) { this._expandable = expandable; this._prefab = prefab; for (let i = 0; i < size; ++i) { @@ -30,7 +28,20 @@ export default class ObjectPool { } } - public get(parent?: Node): T { + public get(parent?: Node): Node; + public get( + parent?: Node, + classConstructor?: + | __private._types_globals__Constructor + | __private._types_globals__AbstractedConstructor, + ): T; + + public get( + parent?: Node, + classConstructor?: + | __private._types_globals__Constructor + | __private._types_globals__AbstractedConstructor, + ): T | Node { let obj: Node = null; let p = parent || director.getScene(); if (this._inactives.length > 0) { @@ -44,21 +55,31 @@ export default class ObjectPool { obj.setParent(p); this._actives.push(obj); } else { - obj = this._actives[0]; + obj = this._actives.shift(); + this._actives.push(obj); } - const comp = obj.getComponent(this._classConstructor) as any; - comp.reuse?.(); - return comp as T; + obj.active = true; + if (classConstructor) { + return obj.getComponent(classConstructor); + } + return obj; } - public release(obj: T) { - obj.node.active = false; - const index = this._actives.indexOf(obj.node); - this._actives.splice(index, 1); - this._inactives.push(obj.node); - const comp = obj.getComponent(this._classConstructor) as any; - comp.unuse?.(); + public release(obj: Node); + public release(obj: T); + public release(obj: T | Node) { + if (obj instanceof Node) { + obj.active = false; + const index = this._actives.indexOf(obj); + this._actives.splice(index, 1); + this._inactives.push(obj); + } else { + obj.node.active = false; + const index = this._actives.indexOf(obj.node); + this._actives.splice(index, 1); + this._inactives.push(obj.node); + } } public clear() { diff --git a/assets/_Game/Scripts/Pool/Pool.ts.meta b/assets/_Game/Scripts/Pool/ObjectPool.ts.meta similarity index 70% rename from assets/_Game/Scripts/Pool/Pool.ts.meta rename to assets/_Game/Scripts/Pool/ObjectPool.ts.meta index 2fc15bd..009e498 100644 --- a/assets/_Game/Scripts/Pool/Pool.ts.meta +++ b/assets/_Game/Scripts/Pool/ObjectPool.ts.meta @@ -2,7 +2,7 @@ "ver": "4.0.23", "importer": "typescript", "imported": true, - "uuid": "aaeff0da-269a-427a-b752-8851ca101b14", + "uuid": "52867bd5-250e-493d-971a-57e17661d010", "files": [], "subMetas": {}, "userData": {}