From a8416732d7bf334157933f2109deaa4d8b9d22da Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 12 Jan 2023 15:50:21 +0100 Subject: [PATCH] Added gold count to the game --- assets/Scenes/Game.scene | 1743 ++++++++++++++-------- assets/Scripts/Game/Game.ts | 3 +- assets/Scripts/Game/Items/ItemManager.ts | 3 +- assets/Scripts/Game/UI/GameUI.ts | 17 +- 4 files changed, 1124 insertions(+), 642 deletions(-) diff --git a/assets/Scenes/Game.scene b/assets/Scenes/Game.scene index d55d210..4270e8e 100644 --- a/assets/Scenes/Game.scene +++ b/assets/Scenes/Game.scene @@ -18,20 +18,20 @@ "__id__": 2 }, { - "__id__": 12 + "__id__": 26 }, { - "__id__": 14 + "__id__": 28 } ], "_active": true, "_components": [], "_prefab": { - "__id__": 112 + "__id__": 134 }, "autoReleaseAssets": false, "_globals": { - "__id__": 117 + "__id__": 139 }, "_id": "cffa5b19-2043-4cef-8221-1a10ab7a2c1f" }, @@ -58,7 +58,12 @@ "fileId": "f6TS0IBq9EGpNVBB7WXcF6", "instance": { "__id__": 4 - } + }, + "targetOverrides": [ + { + "__id__": 16 + } + ] }, { "__type__": "cc.PrefabInstance", @@ -80,6 +85,12 @@ }, { "__id__": 10 + }, + { + "__id__": 12 + }, + { + "__id__": 14 } ], "removedComponents": [] @@ -166,6 +177,169 @@ "3cU8u+g/ZHqZh/QeLhRGlh" ] }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 13 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "f9c0nAyY1AEY+29CNy1WVz" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 15 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "71qF2ggGpMcLF94AUlql0u" + ] + }, + { + "__type__": "cc.TargetOverrideInfo", + "source": null, + "sourceInfo": null, + "propertyPath": [ + "y8" + ], + "target": { + "__id__": 17 + }, + "targetInfo": { + "__id__": 25 + } + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_prefab": { + "__id__": 18 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 17 + }, + "asset": { + "__uuid__": "f668086a-2bff-40eb-a029-dd891718441d", + "__expectedType__": "cc.Prefab" + }, + "fileId": "5da9o8mwlJl5XD861jGbYx", + "instance": { + "__id__": 19 + } + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "56Xvr+wxdEcqGuJ2/9Drtp", + "prefabRootNode": { + "__id__": 2 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 20 + }, + { + "__id__": 22 + }, + { + "__id__": 23 + }, + { + "__id__": 24 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 21 + }, + "propertyPath": [ + "_name" + ], + "value": "Y8" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "5da9o8mwlJl5XD861jGbYx" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 21 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 21 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 21 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "9cOBr9gAFNWbvsaSX5dfaa" + ] + }, { "__type__": "cc.Node", "_name": "TestGameRunner", @@ -177,7 +351,7 @@ "_active": true, "_components": [ { - "__id__": 13 + "__id__": 27 } ], "_prefab": null, @@ -214,7 +388,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 12 + "__id__": 26 }, "_enabled": true, "__prefab": null, @@ -237,65 +411,65 @@ }, "_children": [ { - "__id__": 15 + "__id__": 29 }, { - "__id__": 23 + "__id__": 37 }, { - "__id__": 26 + "__id__": 40 }, { - "__id__": 28 + "__id__": 42 }, { - "__id__": 30 - }, - { - "__id__": 32 - }, - { - "__id__": 34 - }, - { - "__id__": 36 + "__id__": 44 }, { "__id__": 46 }, + { + "__id__": 48 + }, + { + "__id__": 50 + }, { "__id__": 60 }, { - "__id__": 64 + "__id__": 74 }, { - "__id__": 67 + "__id__": 78 }, { - "__id__": 105 + "__id__": 81 + }, + { + "__id__": 127 } ], "_active": true, "_components": [ { - "__id__": 108 + "__id__": 130 }, { - "__id__": 109 + "__id__": 131 }, { - "__id__": 110 + "__id__": 132 }, { - "__id__": 111 + "__id__": 133 } ], "_prefab": null, "_lpos": { "__type__": "cc.Vec3", "x": 319.99999999999994, - "y": 479.99999999999994, + "y": 480.00000000000006, "z": 0 }, "_lrot": { @@ -324,17 +498,17 @@ "__type__": "cc.Node", "_objFlags": 0, "_parent": { - "__id__": 14 + "__id__": 28 }, "_prefab": { - "__id__": 16 + "__id__": 30 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 15 + "__id__": 29 }, "asset": { "__uuid__": "8a193591-d71d-493f-8010-f7c8c13b6ec8", @@ -342,7 +516,7 @@ }, "fileId": "62B+OqAzROoon1s4L/Ur4W", "instance": { - "__id__": 17 + "__id__": 31 } }, { @@ -352,16 +526,16 @@ "mountedComponents": [], "propertyOverrides": [ { - "__id__": 18 + "__id__": 32 }, { - "__id__": 20 + "__id__": 34 }, { - "__id__": 21 + "__id__": 35 }, { - "__id__": 22 + "__id__": 36 } ], "removedComponents": [] @@ -369,7 +543,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 19 + "__id__": 33 }, "propertyPath": [ "_name" @@ -385,7 +559,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 19 + "__id__": 33 }, "propertyPath": [ "_lpos" @@ -400,7 +574,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 19 + "__id__": 33 }, "propertyPath": [ "_lrot" @@ -416,7 +590,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 19 + "__id__": 33 }, "propertyPath": [ "_euler" @@ -433,16 +607,16 @@ "_name": "Background", "_objFlags": 0, "_parent": { - "__id__": 14 + "__id__": 28 }, "_children": [], "_active": true, "_components": [ { - "__id__": 24 + "__id__": 38 }, { - "__id__": 25 + "__id__": 39 } ], "_prefab": null, @@ -479,7 +653,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 23 + "__id__": 37 }, "_enabled": true, "__prefab": null, @@ -500,7 +674,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 23 + "__id__": 37 }, "_enabled": true, "__prefab": null, @@ -533,13 +707,13 @@ "_name": "HaloProjectileLauncher", "_objFlags": 0, "_parent": { - "__id__": 14 + "__id__": 28 }, "_children": [], "_active": true, "_components": [ { - "__id__": 27 + "__id__": 41 } ], "_prefab": null, @@ -576,7 +750,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 26 + "__id__": 40 }, "_enabled": true, "__prefab": null, @@ -591,13 +765,13 @@ "_name": "HorizontalProjectileLauncher", "_objFlags": 0, "_parent": { - "__id__": 14 + "__id__": 28 }, "_children": [], "_active": true, "_components": [ { - "__id__": 29 + "__id__": 43 } ], "_prefab": null, @@ -634,7 +808,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 28 + "__id__": 42 }, "_enabled": true, "__prefab": null, @@ -649,13 +823,13 @@ "_name": "DiagonalProjectileLauncher", "_objFlags": 0, "_parent": { - "__id__": 14 + "__id__": 28 }, "_children": [], "_active": true, "_components": [ { - "__id__": 31 + "__id__": 45 } ], "_prefab": null, @@ -692,7 +866,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 30 + "__id__": 44 }, "_enabled": true, "__prefab": null, @@ -707,13 +881,13 @@ "_name": "EnemyAxeProjectileLauncher", "_objFlags": 0, "_parent": { - "__id__": 14 + "__id__": 28 }, "_children": [], "_active": true, "_components": [ { - "__id__": 33 + "__id__": 47 } ], "_prefab": null, @@ -750,7 +924,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 32 + "__id__": 46 }, "_enabled": true, "__prefab": null, @@ -765,13 +939,13 @@ "_name": "EnemyMagicOrbProjectileLauncher", "_objFlags": 0, "_parent": { - "__id__": 14 + "__id__": 28 }, "_children": [], "_active": true, "_components": [ { - "__id__": 35 + "__id__": 49 } ], "_prefab": null, @@ -808,7 +982,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 34 + "__id__": 48 }, "_enabled": true, "__prefab": null, @@ -822,17 +996,17 @@ "__type__": "cc.Node", "_objFlags": 0, "_parent": { - "__id__": 14 + "__id__": 28 }, "_prefab": { - "__id__": 37 + "__id__": 51 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 36 + "__id__": 50 }, "asset": { "__uuid__": "27c97ec7-9bb8-4e4e-a264-ce49f2ae9843", @@ -840,7 +1014,7 @@ }, "fileId": "fbcM/H31RNxK0HvQrwpElL", "instance": { - "__id__": 38 + "__id__": 52 } }, { @@ -850,19 +1024,19 @@ "mountedComponents": [], "propertyOverrides": [ { - "__id__": 39 + "__id__": 53 }, { - "__id__": 41 + "__id__": 55 }, { - "__id__": 42 + "__id__": 56 }, { - "__id__": 43 + "__id__": 57 }, { - "__id__": 44 + "__id__": 58 } ], "removedComponents": [] @@ -870,7 +1044,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 40 + "__id__": 54 }, "propertyPath": [ "_name" @@ -886,7 +1060,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 40 + "__id__": 54 }, "propertyPath": [ "_lpos" @@ -901,7 +1075,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 40 + "__id__": 54 }, "propertyPath": [ "_lrot" @@ -917,7 +1091,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 40 + "__id__": 54 }, "propertyPath": [ "_euler" @@ -932,7 +1106,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 45 + "__id__": 59 }, "propertyPath": [ "_defaultClip" @@ -953,32 +1127,32 @@ "_name": "ItemManager", "_objFlags": 0, "_parent": { - "__id__": 14 + "__id__": 28 }, "_children": [ { - "__id__": 47 + "__id__": 61 }, { - "__id__": 49 + "__id__": 63 }, { - "__id__": 51 + "__id__": 65 }, { - "__id__": 53 + "__id__": 67 }, { - "__id__": 55 + "__id__": 69 }, { - "__id__": 57 + "__id__": 71 } ], "_active": true, "_components": [ { - "__id__": 59 + "__id__": 73 } ], "_prefab": null, @@ -1014,430 +1188,6 @@ "__type__": "cc.Node", "_name": "XPSpawner", "_objFlags": 0, - "_parent": { - "__id__": 46 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 48 - } - ], - "_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 - }, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "b7cM/vyZtNY6PANwPA4aXG" - }, - { - "__type__": "74c52wKzO1PKKANoBI3QmS7", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 47 - }, - "_enabled": true, - "__prefab": null, - "itemPrefab": { - "__uuid__": "b83dbe32-6b43-4ea9-b0e2-5f96c09f459d", - "__expectedType__": "cc.Prefab" - }, - "_id": "74SD65OzxL97xx+bjixxu6" - }, - { - "__type__": "cc.Node", - "_name": "GoldSpawner", - "_objFlags": 0, - "_parent": { - "__id__": 46 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 50 - } - ], - "_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 - }, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "4c8/jo4pJOlpZd+rBu+9OO" - }, - { - "__type__": "74c52wKzO1PKKANoBI3QmS7", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 49 - }, - "_enabled": true, - "__prefab": null, - "itemPrefab": { - "__uuid__": "eb604b78-90e3-4379-bb3a-7f1271d8a403", - "__expectedType__": "cc.Prefab" - }, - "_id": "c0UNQTkjRNP4kkXqFPMw4j" - }, - { - "__type__": "cc.Node", - "_name": "HealthPotionSpawner", - "_objFlags": 0, - "_parent": { - "__id__": 46 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 52 - } - ], - "_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 - }, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "17lYyBgbtI7ZCekaxNE2yC" - }, - { - "__type__": "74c52wKzO1PKKANoBI3QmS7", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 51 - }, - "_enabled": true, - "__prefab": null, - "itemPrefab": { - "__uuid__": "ef33cda3-5ce0-41e6-ba03-7194178de12c", - "__expectedType__": "cc.Prefab" - }, - "_id": "72Dz+rQopMS4DJXvXrFAcs" - }, - { - "__type__": "cc.Node", - "_name": "MagnetSpawner", - "_objFlags": 0, - "_parent": { - "__id__": 46 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 54 - } - ], - "_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 - }, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "d3puzP7sNB4KI0qEF0BHBR" - }, - { - "__type__": "74c52wKzO1PKKANoBI3QmS7", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 53 - }, - "_enabled": true, - "__prefab": null, - "itemPrefab": { - "__uuid__": "00455faa-84a3-4c25-993b-84732eca0f80", - "__expectedType__": "cc.Prefab" - }, - "_id": "38TwQ96mZLgLT++iB8KnY2" - }, - { - "__type__": "cc.Node", - "_name": "ChestSpawner", - "_objFlags": 0, - "_parent": { - "__id__": 46 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 56 - } - ], - "_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 - }, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "40jL+o7cpKSbqCR+zI3BKp" - }, - { - "__type__": "74c52wKzO1PKKANoBI3QmS7", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 55 - }, - "_enabled": true, - "__prefab": null, - "itemPrefab": { - "__uuid__": "46ebbe9e-799f-4aa0-8e69-482ef73fd734", - "__expectedType__": "cc.Prefab" - }, - "_id": "08I6gl4JNEbaCMH16LKZCw" - }, - { - "__type__": "cc.Node", - "_name": "PickupEffectManager", - "_objFlags": 0, - "_parent": { - "__id__": 46 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 58 - } - ], - "_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 - }, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "98e6SJrnJIlYvBUzvAiGSQ" - }, - { - "__type__": "65b41IfpM9H4ZfUHg0/xy7s", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 57 - }, - "_enabled": true, - "__prefab": null, - "pickupEffect": { - "__uuid__": "37b789e2-6452-48fe-a2fe-efec6ea89d5c", - "__expectedType__": "cc.Prefab" - }, - "_id": "54wwD4xgxJD6Ay14uROQJ8" - }, - { - "__type__": "7f3f88Cth5KB41SHDJviJ/K", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 46 - }, - "_enabled": true, - "__prefab": null, - "xpSpawner": { - "__id__": 48 - }, - "goldSpawner": { - "__id__": 50 - }, - "healthPotionSpawner": { - "__id__": 52 - }, - "magnetSpawner": { - "__id__": 54 - }, - "chestSpawner": { - "__id__": 56 - }, - "pickupEffectManager": { - "__id__": 58 - }, - "_id": "98EDpSoeBKp7eDmPXKNFJ0" - }, - { - "__type__": "cc.Node", - "_name": "EnemyManager", - "_objFlags": 0, - "_parent": { - "__id__": 14 - }, - "_children": [ - { - "__id__": 61 - } - ], - "_active": true, - "_components": [ - { - "__id__": 63 - } - ], - "_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 - }, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "c5hUW3WnRPzJB48SFIf+Ud" - }, - { - "__type__": "cc.Node", - "_name": "EnemySpawner", - "_objFlags": 0, "_parent": { "__id__": 60 }, @@ -1475,6 +1225,430 @@ "y": 0, "z": 0 }, + "_id": "b7cM/vyZtNY6PANwPA4aXG" + }, + { + "__type__": "74c52wKzO1PKKANoBI3QmS7", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 61 + }, + "_enabled": true, + "__prefab": null, + "itemPrefab": { + "__uuid__": "b83dbe32-6b43-4ea9-b0e2-5f96c09f459d", + "__expectedType__": "cc.Prefab" + }, + "_id": "74SD65OzxL97xx+bjixxu6" + }, + { + "__type__": "cc.Node", + "_name": "GoldSpawner", + "_objFlags": 0, + "_parent": { + "__id__": 60 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 64 + } + ], + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "4c8/jo4pJOlpZd+rBu+9OO" + }, + { + "__type__": "74c52wKzO1PKKANoBI3QmS7", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 63 + }, + "_enabled": true, + "__prefab": null, + "itemPrefab": { + "__uuid__": "eb604b78-90e3-4379-bb3a-7f1271d8a403", + "__expectedType__": "cc.Prefab" + }, + "_id": "c0UNQTkjRNP4kkXqFPMw4j" + }, + { + "__type__": "cc.Node", + "_name": "HealthPotionSpawner", + "_objFlags": 0, + "_parent": { + "__id__": 60 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 66 + } + ], + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "17lYyBgbtI7ZCekaxNE2yC" + }, + { + "__type__": "74c52wKzO1PKKANoBI3QmS7", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 65 + }, + "_enabled": true, + "__prefab": null, + "itemPrefab": { + "__uuid__": "ef33cda3-5ce0-41e6-ba03-7194178de12c", + "__expectedType__": "cc.Prefab" + }, + "_id": "72Dz+rQopMS4DJXvXrFAcs" + }, + { + "__type__": "cc.Node", + "_name": "MagnetSpawner", + "_objFlags": 0, + "_parent": { + "__id__": 60 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 68 + } + ], + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "d3puzP7sNB4KI0qEF0BHBR" + }, + { + "__type__": "74c52wKzO1PKKANoBI3QmS7", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 67 + }, + "_enabled": true, + "__prefab": null, + "itemPrefab": { + "__uuid__": "00455faa-84a3-4c25-993b-84732eca0f80", + "__expectedType__": "cc.Prefab" + }, + "_id": "38TwQ96mZLgLT++iB8KnY2" + }, + { + "__type__": "cc.Node", + "_name": "ChestSpawner", + "_objFlags": 0, + "_parent": { + "__id__": 60 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 70 + } + ], + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "40jL+o7cpKSbqCR+zI3BKp" + }, + { + "__type__": "74c52wKzO1PKKANoBI3QmS7", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 69 + }, + "_enabled": true, + "__prefab": null, + "itemPrefab": { + "__uuid__": "46ebbe9e-799f-4aa0-8e69-482ef73fd734", + "__expectedType__": "cc.Prefab" + }, + "_id": "08I6gl4JNEbaCMH16LKZCw" + }, + { + "__type__": "cc.Node", + "_name": "PickupEffectManager", + "_objFlags": 0, + "_parent": { + "__id__": 60 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 72 + } + ], + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "98e6SJrnJIlYvBUzvAiGSQ" + }, + { + "__type__": "65b41IfpM9H4ZfUHg0/xy7s", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 71 + }, + "_enabled": true, + "__prefab": null, + "pickupEffect": { + "__uuid__": "37b789e2-6452-48fe-a2fe-efec6ea89d5c", + "__expectedType__": "cc.Prefab" + }, + "_id": "54wwD4xgxJD6Ay14uROQJ8" + }, + { + "__type__": "7f3f88Cth5KB41SHDJviJ/K", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 60 + }, + "_enabled": true, + "__prefab": null, + "xpSpawner": { + "__id__": 62 + }, + "goldSpawner": { + "__id__": 64 + }, + "healthPotionSpawner": { + "__id__": 66 + }, + "magnetSpawner": { + "__id__": 68 + }, + "chestSpawner": { + "__id__": 70 + }, + "pickupEffectManager": { + "__id__": 72 + }, + "_id": "98EDpSoeBKp7eDmPXKNFJ0" + }, + { + "__type__": "cc.Node", + "_name": "EnemyManager", + "_objFlags": 0, + "_parent": { + "__id__": 28 + }, + "_children": [ + { + "__id__": 75 + } + ], + "_active": true, + "_components": [ + { + "__id__": 77 + } + ], + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "c5hUW3WnRPzJB48SFIf+Ud" + }, + { + "__type__": "cc.Node", + "_name": "EnemySpawner", + "_objFlags": 0, + "_parent": { + "__id__": 74 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 76 + } + ], + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, "_id": "936Vpv3ydL8JZMvakVgAP5" }, { @@ -1482,7 +1656,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 61 + "__id__": 75 }, "_enabled": true, "__prefab": null, @@ -1535,12 +1709,12 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 60 + "__id__": 74 }, "_enabled": true, "__prefab": null, "enemySpawner": { - "__id__": 62 + "__id__": 76 }, "_id": "1ffjazmm5IkZwKInsSIULY" }, @@ -1549,16 +1723,16 @@ "_name": "EnemyDeathEffectManager", "_objFlags": 0, "_parent": { - "__id__": 14 + "__id__": 28 }, "_children": [], "_active": true, "_components": [ { - "__id__": 65 + "__id__": 79 }, { - "__id__": 66 + "__id__": 80 } ], "_prefab": null, @@ -1595,7 +1769,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 64 + "__id__": 78 }, "_enabled": true, "__prefab": null, @@ -1616,7 +1790,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 64 + "__id__": 78 }, "_enabled": true, "__prefab": null, @@ -1631,20 +1805,20 @@ "_name": "GameUI", "_objFlags": 0, "_parent": { - "__id__": 14 + "__id__": 28 }, "_children": [ { - "__id__": 68 + "__id__": 82 }, { - "__id__": 95 + "__id__": 117 } ], "_active": true, "_components": [ { - "__id__": 104 + "__id__": 126 } ], "_prefab": null, @@ -1681,33 +1855,36 @@ "_name": "TopUI", "_objFlags": 0, "_parent": { - "__id__": 67 + "__id__": 81 }, "_children": [ { - "__id__": 69 + "__id__": 83 }, { - "__id__": 81 + "__id__": 95 }, { - "__id__": 84 + "__id__": 98 + }, + { + "__id__": 107 } ], "_active": true, "_components": [ { - "__id__": 93 + "__id__": 115 }, { - "__id__": 94 + "__id__": 116 } ], "_prefab": null, "_lpos": { "__type__": "cc.Vec3", "x": -320, - "y": 480, + "y": 480.0000000000001, "z": -1000 }, "_lrot": { @@ -1737,26 +1914,26 @@ "_name": "XpBar", "_objFlags": 0, "_parent": { - "__id__": 68 + "__id__": 82 }, "_children": [ { - "__id__": 70 + "__id__": 84 }, { - "__id__": 73 + "__id__": 87 }, { - "__id__": 76 + "__id__": 90 } ], "_active": true, "_components": [ { - "__id__": 79 + "__id__": 93 }, { - "__id__": 80 + "__id__": 94 } ], "_prefab": null, @@ -1793,16 +1970,16 @@ "_name": "Background", "_objFlags": 0, "_parent": { - "__id__": 69 + "__id__": 83 }, "_children": [], "_active": false, "_components": [ { - "__id__": 71 + "__id__": 85 }, { - "__id__": 72 + "__id__": 86 } ], "_prefab": null, @@ -1839,7 +2016,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 70 + "__id__": 84 }, "_enabled": true, "__prefab": null, @@ -1860,7 +2037,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 70 + "__id__": 84 }, "_enabled": true, "__prefab": null, @@ -1898,16 +2075,16 @@ "_name": "Background-001", "_objFlags": 0, "_parent": { - "__id__": 69 + "__id__": 83 }, "_children": [], "_active": true, "_components": [ { - "__id__": 74 + "__id__": 88 }, { - "__id__": 75 + "__id__": 89 } ], "_prefab": null, @@ -1944,7 +2121,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 73 + "__id__": 87 }, "_enabled": true, "__prefab": null, @@ -1965,7 +2142,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 73 + "__id__": 87 }, "_enabled": true, "__prefab": null, @@ -2003,16 +2180,16 @@ "_name": "MovableBar", "_objFlags": 0, "_parent": { - "__id__": 69 + "__id__": 83 }, "_children": [], "_active": true, "_components": [ { - "__id__": 77 + "__id__": 91 }, { - "__id__": 78 + "__id__": 92 } ], "_prefab": null, @@ -2049,7 +2226,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 76 + "__id__": 90 }, "_enabled": true, "__prefab": null, @@ -2070,7 +2247,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 76 + "__id__": 90 }, "_enabled": true, "__prefab": null, @@ -2108,7 +2285,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 69 + "__id__": 83 }, "_enabled": true, "__prefab": null, @@ -2129,12 +2306,12 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 69 + "__id__": 83 }, "_enabled": true, "__prefab": null, "_barSprite": { - "__id__": 78 + "__id__": 92 }, "_mode": 0, "_totalLength": 284, @@ -2147,16 +2324,16 @@ "_name": "TimeAliveText", "_objFlags": 0, "_parent": { - "__id__": 68 + "__id__": 82 }, "_children": [], "_active": true, "_components": [ { - "__id__": 82 + "__id__": 96 }, { - "__id__": 83 + "__id__": 97 } ], "_prefab": null, @@ -2193,7 +2370,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 81 + "__id__": 95 }, "_enabled": true, "__prefab": null, @@ -2214,7 +2391,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 81 + "__id__": 95 }, "_enabled": true, "__prefab": null, @@ -2255,29 +2432,29 @@ "_name": "PauseBtn", "_objFlags": 0, "_parent": { - "__id__": 68 + "__id__": 82 }, "_children": [ { - "__id__": 85 + "__id__": 99 } ], "_active": true, "_components": [ { - "__id__": 88 + "__id__": 102 }, { - "__id__": 89 + "__id__": 103 }, { - "__id__": 90 + "__id__": 104 }, { - "__id__": 91 + "__id__": 105 }, { - "__id__": 92 + "__id__": 106 } ], "_prefab": null, @@ -2314,16 +2491,16 @@ "_name": "Square", "_objFlags": 0, "_parent": { - "__id__": 84 + "__id__": 98 }, "_children": [], "_active": true, "_components": [ { - "__id__": 86 + "__id__": 100 }, { - "__id__": 87 + "__id__": 101 } ], "_prefab": null, @@ -2360,7 +2537,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 85 + "__id__": 99 }, "_enabled": true, "__prefab": null, @@ -2381,7 +2558,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 85 + "__id__": 99 }, "_enabled": true, "__prefab": null, @@ -2422,7 +2599,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 84 + "__id__": 98 }, "_enabled": true, "__prefab": null, @@ -2443,7 +2620,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 84 + "__id__": 98 }, "_enabled": true, "__prefab": null, @@ -2481,7 +2658,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 84 + "__id__": 98 }, "_enabled": true, "__prefab": null, @@ -2535,7 +2712,7 @@ "_duration": 0.1, "_zoomScale": 0.92, "_target": { - "__id__": 84 + "__id__": 98 }, "_id": "44V8O8mzZKQZv5NNhU9U2X" }, @@ -2544,7 +2721,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 84 + "__id__": 98 }, "_enabled": true, "__prefab": null, @@ -2555,21 +2732,308 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 84 + "__id__": 98 }, "_enabled": true, "__prefab": null, "button": { - "__id__": 91 + "__id__": 105 }, "_id": "19CfluWQpOB4qddmLDK5n9" }, + { + "__type__": "cc.Node", + "_name": "GoldCount", + "_objFlags": 0, + "_parent": { + "__id__": 82 + }, + "_children": [ + { + "__id__": 108 + }, + { + "__id__": 111 + } + ], + "_active": true, + "_components": [ + { + "__id__": 114 + } + ], + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "7fPczruidECKoUXrdBlLxC" + }, + { + "__type__": "cc.Node", + "_name": "GoldSprite", + "_objFlags": 0, + "_parent": { + "__id__": 107 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 109 + }, + { + "__id__": 110 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 36.425, + "y": -62.549, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "40TlCcxUNBhrbKQh2tiN9z" + }, { "__type__": "cc.UITransform", "_name": "", "_objFlags": 0, "node": { - "__id__": 68 + "__id__": 108 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 28, + "height": 28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "84UMKZyxhE57eUncF5RU+C" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 108 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "d18dd93e-df20-447d-96dd-d4d8e5507d87@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": { + "__uuid__": "c4872559-07b2-44e5-9613-5f22506b1989", + "__expectedType__": "cc.SpriteAtlas" + }, + "_id": "4fd9bk9AZGaqHB6HC4CBSo" + }, + { + "__type__": "cc.Node", + "_name": "GoldLabel", + "_objFlags": 0, + "_parent": { + "__id__": 107 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 112 + }, + { + "__id__": 113 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 54.488, + "y": -62.347, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "34ZXkXki5F5IzJlCcr5vJA" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 111 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 16.07, + "height": 30 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_id": "a2ZG3Tl5JEXJOGFk3vxe7D" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 111 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 224, + "b": 0, + "a": 255 + }, + "_string": "0", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 30, + "_fontSize": 30, + "_fontFamily": "Arial", + "_lineHeight": 30, + "_overflow": 0, + "_enableWrapText": true, + "_font": { + "__uuid__": "c96b42a9-d20d-4c59-8e99-8ed749a715c8", + "__expectedType__": "cc.BitmapFont" + }, + "_isSystemFontUsed": false, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_id": "a5g867YChPkqWRTiMxmamo" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 107 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "15WWn9leJBuYJ0PzNnEUzt" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 82 }, "_enabled": true, "__prefab": null, @@ -2590,7 +3054,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 68 + "__id__": 82 }, "_enabled": true, "__prefab": null, @@ -2619,17 +3083,17 @@ "_name": "UI", "_objFlags": 0, "_parent": { - "__id__": 67 + "__id__": 81 }, "_children": [ { - "__id__": 96 + "__id__": 118 } ], "_active": true, "_components": [ { - "__id__": 103 + "__id__": 125 } ], "_prefab": null, @@ -2666,23 +3130,23 @@ "_name": "VirtualJoystic", "_objFlags": 0, "_parent": { - "__id__": 95 + "__id__": 117 }, "_children": [ { - "__id__": 97 + "__id__": 119 } ], "_active": true, "_components": [ { - "__id__": 100 + "__id__": 122 }, { - "__id__": 101 + "__id__": 123 }, { - "__id__": 102 + "__id__": 124 } ], "_prefab": null, @@ -2719,16 +3183,16 @@ "_name": "Knob", "_objFlags": 0, "_parent": { - "__id__": 96 + "__id__": 118 }, "_children": [], "_active": true, "_components": [ { - "__id__": 98 + "__id__": 120 }, { - "__id__": 99 + "__id__": 121 } ], "_prefab": null, @@ -2765,7 +3229,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 97 + "__id__": 119 }, "_enabled": true, "__prefab": null, @@ -2786,7 +3250,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 97 + "__id__": 119 }, "_enabled": true, "__prefab": null, @@ -2824,7 +3288,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 96 + "__id__": 118 }, "_enabled": true, "__prefab": null, @@ -2845,7 +3309,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 96 + "__id__": 118 }, "_enabled": true, "__prefab": null, @@ -2886,13 +3350,13 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 96 + "__id__": 118 }, "_enabled": true, "__prefab": null, "maxDistance": 46, "knob": { - "__id__": 97 + "__id__": 119 }, "_id": "50ceZG62tGlYXvZWEvSDKl" }, @@ -2901,7 +3365,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 95 + "__id__": 117 }, "_enabled": true, "__prefab": null, @@ -2922,18 +3386,21 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 67 + "__id__": 81 }, "_enabled": true, "__prefab": null, "xpBar": { - "__id__": 80 + "__id__": 94 }, "timeAliveText": { - "__id__": 83 + "__id__": 97 + }, + "goldLabel": { + "__id__": 113 }, "pauseBtn": { - "__id__": 91 + "__id__": 105 }, "_id": "bau/7eItRFrKKoAZZb/uYL" }, @@ -2942,16 +3409,16 @@ "_name": "BlackScreen", "_objFlags": 0, "_parent": { - "__id__": 14 + "__id__": 28 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { - "__id__": 106 + "__id__": 128 }, { - "__id__": 107 + "__id__": 129 } ], "_prefab": null, @@ -2988,7 +3455,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 105 + "__id__": 127 }, "_enabled": true, "__prefab": null, @@ -3009,7 +3476,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 105 + "__id__": 127 }, "_enabled": true, "__prefab": null, @@ -3047,7 +3514,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 14 + "__id__": 28 }, "_enabled": true, "__prefab": null, @@ -3068,7 +3535,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 14 + "__id__": 28 }, "_enabled": true, "__prefab": null, @@ -3081,7 +3548,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 14 + "__id__": 28 }, "_enabled": true, "__prefab": null, @@ -3089,8 +3556,8 @@ "_target": null, "_left": -5.684341886080802e-14, "_right": 0, - "_top": 0, - "_bottom": -5.684341886080802e-14, + "_top": 1.1368683772161603e-13, + "_bottom": 5.684341886080802e-14, "_horizontalCenter": 0, "_verticalCenter": 0, "_isAbsLeft": true, @@ -3110,50 +3577,50 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 14 + "__id__": 28 }, "_enabled": true, "__prefab": null, "virtualJoystic": { - "__id__": 102 + "__id__": 124 }, "player": null, "haloProjectileLauncherComponent": { - "__id__": 27 + "__id__": 41 }, "horizontalProjectileLauncherComponent": { - "__id__": 29 + "__id__": 43 }, "diagonalProjectileLauncherComponent": { - "__id__": 31 + "__id__": 45 }, "enemyAxeProjectileLauncherComponent": { - "__id__": 33 + "__id__": 47 }, "enemyMagicOrbProjectileLauncherComponent": { - "__id__": 35 + "__id__": 49 }, "enemyManager": { - "__id__": 63 + "__id__": 77 }, "deathEffectSpawner": { - "__id__": 66 + "__id__": 80 }, "itemManager": { - "__id__": 59 + "__id__": 73 }, "gameUI": { - "__id__": 104 + "__id__": 126 }, "gameCanvas": { - "__id__": 109 + "__id__": 131 }, "background": { - "__id__": 25 + "__id__": 39 }, "gameAudioAdapter": null, "blackScreen": { - "__id__": 105 + "__id__": 127 }, "_id": "3a9z1bqlFCGL4/WyDwU4L5" }, @@ -3162,10 +3629,10 @@ "fileId": "cffa5b19-2043-4cef-8221-1a10ab7a2c1f", "targetOverrides": [ { - "__id__": 113 + "__id__": 135 }, { - "__id__": 115 + "__id__": 137 } ], "nestedPrefabInstanceRoots": [ @@ -3173,27 +3640,27 @@ "__id__": 2 }, { - "__id__": 15 + "__id__": 29 }, { - "__id__": 36 + "__id__": 50 } ] }, { "__type__": "cc.TargetOverrideInfo", "source": { - "__id__": 111 + "__id__": 133 }, "sourceInfo": null, "propertyPath": [ "player" ], "target": { - "__id__": 36 + "__id__": 50 }, "targetInfo": { - "__id__": 114 + "__id__": 136 } }, { @@ -3205,17 +3672,17 @@ { "__type__": "cc.TargetOverrideInfo", "source": { - "__id__": 111 + "__id__": 133 }, "sourceInfo": null, "propertyPath": [ "gameAudioAdapter" ], "target": { - "__id__": 15 + "__id__": 29 }, "targetInfo": { - "__id__": 116 + "__id__": 138 } }, { @@ -3227,19 +3694,19 @@ { "__type__": "cc.SceneGlobals", "ambient": { - "__id__": 118 + "__id__": 140 }, "shadows": { - "__id__": 119 + "__id__": 141 }, "_skybox": { - "__id__": 120 + "__id__": 142 }, "fog": { - "__id__": 121 + "__id__": 143 }, "octree": { - "__id__": 122 + "__id__": 144 } }, { diff --git a/assets/Scripts/Game/Game.ts b/assets/Scripts/Game/Game.ts index 6bd90d1..901fed1 100644 --- a/assets/Scripts/Game/Game.ts +++ b/assets/Scripts/Game/Game.ts @@ -76,6 +76,7 @@ export class Game extends Component { public start(): void { this.gamePauser.pause(); Game.instance = this; + this.blackScreen.active = true; } public async play(userData: UserData, settings: GameSettings, translationData: TranslationData, testValues?: TestValues): Promise { @@ -206,7 +207,7 @@ export class Game extends Component { const modalLauncher = new GameModalLauncher(AppRoot.Instance.ModalWindowManager, this.player, this.gamePauser, upgrader, translationData); this.itemManager.init(this.enemyManager, this.player, this.gameResult, modalLauncher, settings.items); - this.gameUI.init(this.player, modalLauncher); + this.gameUI.init(this.player, modalLauncher, this.itemManager, this.gameResult); this.background.init(this.player.node); if (testValues) { diff --git a/assets/Scripts/Game/Items/ItemManager.ts b/assets/Scripts/Game/Items/ItemManager.ts index e197e92..2940fff 100644 --- a/assets/Scripts/Game/Items/ItemManager.ts +++ b/assets/Scripts/Game/Items/ItemManager.ts @@ -64,9 +64,8 @@ export class ItemManager extends Component { if (!this.itemTypeToAction.has(item.ItemType)) throw new Error("Does not have behaviour set for " + item.ItemType); this.pickupEffectManager.showEffect(item.node.worldPosition); - this.pickupEvent.trigger(item.ItemType); - this.itemTypeToAction.get(item.ItemType)(); + this.pickupEvent.trigger(item.ItemType); item.pickup(); } diff --git a/assets/Scripts/Game/UI/GameUI.ts b/assets/Scripts/Game/UI/GameUI.ts index ca10fe2..7fc9322 100644 --- a/assets/Scripts/Game/UI/GameUI.ts +++ b/assets/Scripts/Game/UI/GameUI.ts @@ -1,5 +1,8 @@ import { Component, Label, ProgressBar, _decorator } from "cc"; import { UIButton } from "../../Services/UI/Button/UIButton"; +import { GameResult } from "../Game"; +import { ItemManager } from "../Items/ItemManager"; +import { ItemType } from "../Items/ItemType"; import { GameModalLauncher } from "../ModalWIndows/GameModalLauncher"; import { Player } from "../Unit/Player/Player"; import { UnitLevel } from "../Unit/UnitLevel"; @@ -10,17 +13,23 @@ const { ccclass, property } = _decorator; export class GameUI extends Component { @property(ProgressBar) private xpBar: ProgressBar; @property(Label) private timeAliveText: Label; + @property(Label) private goldLabel: Label; @property(UIButton) private pauseBtn: UIButton; private playerLevel: UnitLevel; private modalLauncher: GameModalLauncher; + private gameResult: GameResult; - public init(player: Player, modalLauncher: GameModalLauncher): void { + public init(player: Player, modalLauncher: GameModalLauncher, itemManager: ItemManager, gameResult: GameResult): void { this.playerLevel = player.Level; this.modalLauncher = modalLauncher; + this.gameResult = gameResult; this.playerLevel.XpAddedEvent.on(this.updateProgressBar, this); this.playerLevel.LevelUpEvent.on(this.updateProgressBar, this); + + itemManager.PickupEvent.on(this.tryUpdateGoldLabel, this); + this.xpBar.progress = 0; this.pauseBtn.InteractedEvent.on(this.showPauseWindow, this); @@ -30,6 +39,12 @@ export class GameUI extends Component { this.xpBar.progress = this.playerLevel.XP / this.playerLevel.RequiredXP; } + private tryUpdateGoldLabel(itemType: ItemType): void { + if (itemType !== ItemType.Gold) return; + + this.goldLabel.string = this.gameResult.goldCoins.toString(); + } + private showPauseWindow(): void { console.log("Show pause window"); this.modalLauncher.showPauseModal();