From f7b345ef93bb37ea3504209f15625ff0466a6e68 Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 12 Dec 2022 09:15:27 +0100 Subject: [PATCH] Folder structure --- assets/Media/Prefabs/AppRoot.prefab | 85 +++ assets/Media/Prefabs/AppRoot.prefab.meta | 13 + assets/Media/Prefabs/Game.meta | 12 + assets/Media/Prefabs/{ => Game}/Enemy.prefab | 0 .../Prefabs/{ => Game}/Enemy.prefab.meta | 0 .../{ => Game}/PlayerProjectile.prefab | 0 .../{ => Game}/PlayerProjectile.prefab.meta | 0 assets/Media/Prefabs/{ => Game}/UI.meta | 0 .../{ => Game}/UI/LevelUpModalWindow.meta | 0 .../UI/LevelUpModalWindow/LevelUpSkill.prefab | 0 .../LevelUpSkill.prefab.meta | 0 assets/Media/Prefabs/{ => Game}/XP.prefab | 0 .../Media/Prefabs/{ => Game}/XP.prefab.meta | 0 assets/Scenes/Game.scene | 705 +++++++++++------- assets/Scenes/Menu.scene | 356 ++++++--- assets/Scripts/Game/TestGameRunner.ts | 18 + assets/Scripts/Game/TestGameRunner.ts.meta | 9 + assets/Scripts/Menu/GameRunner.ts | 9 + assets/Scripts/Menu/Menu.ts | 3 +- assets/Scripts/Utils.meta | 12 + 20 files changed, 855 insertions(+), 367 deletions(-) create mode 100644 assets/Media/Prefabs/AppRoot.prefab create mode 100644 assets/Media/Prefabs/AppRoot.prefab.meta create mode 100644 assets/Media/Prefabs/Game.meta rename assets/Media/Prefabs/{ => Game}/Enemy.prefab (100%) rename assets/Media/Prefabs/{ => Game}/Enemy.prefab.meta (100%) rename assets/Media/Prefabs/{ => Game}/PlayerProjectile.prefab (100%) rename assets/Media/Prefabs/{ => Game}/PlayerProjectile.prefab.meta (100%) rename assets/Media/Prefabs/{ => Game}/UI.meta (100%) rename assets/Media/Prefabs/{ => Game}/UI/LevelUpModalWindow.meta (100%) rename assets/Media/Prefabs/{ => Game}/UI/LevelUpModalWindow/LevelUpSkill.prefab (100%) rename assets/Media/Prefabs/{ => Game}/UI/LevelUpModalWindow/LevelUpSkill.prefab.meta (100%) rename assets/Media/Prefabs/{ => Game}/XP.prefab (100%) rename assets/Media/Prefabs/{ => Game}/XP.prefab.meta (100%) create mode 100644 assets/Scripts/Game/TestGameRunner.ts create mode 100644 assets/Scripts/Game/TestGameRunner.ts.meta create mode 100644 assets/Scripts/Utils.meta diff --git a/assets/Media/Prefabs/AppRoot.prefab b/assets/Media/Prefabs/AppRoot.prefab new file mode 100644 index 0000000..fccf0f7 --- /dev/null +++ b/assets/Media/Prefabs/AppRoot.prefab @@ -0,0 +1,85 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "AppRoot", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "AppRoot", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 4 + }, + "_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": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "4943dSvt9FBvLizJ1HhFOzg", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 3 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "27BpfekuJFg5U8UHM0svbc" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "f6TS0IBq9EGpNVBB7WXcF6" + } +] \ No newline at end of file diff --git a/assets/Media/Prefabs/AppRoot.prefab.meta b/assets/Media/Prefabs/AppRoot.prefab.meta new file mode 100644 index 0000000..4092e22 --- /dev/null +++ b/assets/Media/Prefabs/AppRoot.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.40", + "importer": "prefab", + "imported": true, + "uuid": "2e5e69ef-0211-425c-9580-f5e760127619", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "AppRoot" + } +} diff --git a/assets/Media/Prefabs/Game.meta b/assets/Media/Prefabs/Game.meta new file mode 100644 index 0000000..fcd9ed9 --- /dev/null +++ b/assets/Media/Prefabs/Game.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "7b350bd0-c53a-4636-8db8-6ed38757d599", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/assets/Media/Prefabs/Enemy.prefab b/assets/Media/Prefabs/Game/Enemy.prefab similarity index 100% rename from assets/Media/Prefabs/Enemy.prefab rename to assets/Media/Prefabs/Game/Enemy.prefab diff --git a/assets/Media/Prefabs/Enemy.prefab.meta b/assets/Media/Prefabs/Game/Enemy.prefab.meta similarity index 100% rename from assets/Media/Prefabs/Enemy.prefab.meta rename to assets/Media/Prefabs/Game/Enemy.prefab.meta diff --git a/assets/Media/Prefabs/PlayerProjectile.prefab b/assets/Media/Prefabs/Game/PlayerProjectile.prefab similarity index 100% rename from assets/Media/Prefabs/PlayerProjectile.prefab rename to assets/Media/Prefabs/Game/PlayerProjectile.prefab diff --git a/assets/Media/Prefabs/PlayerProjectile.prefab.meta b/assets/Media/Prefabs/Game/PlayerProjectile.prefab.meta similarity index 100% rename from assets/Media/Prefabs/PlayerProjectile.prefab.meta rename to assets/Media/Prefabs/Game/PlayerProjectile.prefab.meta diff --git a/assets/Media/Prefabs/UI.meta b/assets/Media/Prefabs/Game/UI.meta similarity index 100% rename from assets/Media/Prefabs/UI.meta rename to assets/Media/Prefabs/Game/UI.meta diff --git a/assets/Media/Prefabs/UI/LevelUpModalWindow.meta b/assets/Media/Prefabs/Game/UI/LevelUpModalWindow.meta similarity index 100% rename from assets/Media/Prefabs/UI/LevelUpModalWindow.meta rename to assets/Media/Prefabs/Game/UI/LevelUpModalWindow.meta diff --git a/assets/Media/Prefabs/UI/LevelUpModalWindow/LevelUpSkill.prefab b/assets/Media/Prefabs/Game/UI/LevelUpModalWindow/LevelUpSkill.prefab similarity index 100% rename from assets/Media/Prefabs/UI/LevelUpModalWindow/LevelUpSkill.prefab rename to assets/Media/Prefabs/Game/UI/LevelUpModalWindow/LevelUpSkill.prefab diff --git a/assets/Media/Prefabs/UI/LevelUpModalWindow/LevelUpSkill.prefab.meta b/assets/Media/Prefabs/Game/UI/LevelUpModalWindow/LevelUpSkill.prefab.meta similarity index 100% rename from assets/Media/Prefabs/UI/LevelUpModalWindow/LevelUpSkill.prefab.meta rename to assets/Media/Prefabs/Game/UI/LevelUpModalWindow/LevelUpSkill.prefab.meta diff --git a/assets/Media/Prefabs/XP.prefab b/assets/Media/Prefabs/Game/XP.prefab similarity index 100% rename from assets/Media/Prefabs/XP.prefab rename to assets/Media/Prefabs/Game/XP.prefab diff --git a/assets/Media/Prefabs/XP.prefab.meta b/assets/Media/Prefabs/Game/XP.prefab.meta similarity index 100% rename from assets/Media/Prefabs/XP.prefab.meta rename to assets/Media/Prefabs/Game/XP.prefab.meta diff --git a/assets/Scenes/Game.scene b/assets/Scenes/Game.scene index 700c6b5..fe32ab1 100644 --- a/assets/Scenes/Game.scene +++ b/assets/Scenes/Game.scene @@ -10,25 +10,193 @@ }, { "__type__": "cc.Scene", - "_name": "scene", + "_name": "Game", "_objFlags": 0, "_parent": null, "_children": [ { "__id__": 2 + }, + { + "__id__": 10 + }, + { + "__id__": 12 } ], "_active": true, "_components": [], "_prefab": { - "__id__": 120 + "__id__": 130 }, "autoReleaseAssets": false, "_globals": { - "__id__": 121 + "__id__": 131 }, "_id": "cffa5b19-2043-4cef-8221-1a10ab7a2c1f" }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_prefab": { + "__id__": 3 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "2e5e69ef-0211-425c-9580-f5e760127619", + "__expectedType__": "cc.Prefab" + }, + "fileId": "f6TS0IBq9EGpNVBB7WXcF6", + "instance": { + "__id__": 4 + } + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "2cE5keafBCfLqtYFS+NiXv", + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 5 + }, + { + "__id__": 7 + }, + { + "__id__": 8 + }, + { + "__id__": 9 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 6 + }, + "propertyPath": [ + "_name" + ], + "value": "AppRoot" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "f6TS0IBq9EGpNVBB7WXcF6" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 6 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 6 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 6 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "cc.Node", + "_name": "TestGameRunner", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 11 + } + ], + "_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": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "1bOECK7cJJo79mBUT8zCf4" + }, + { + "__type__": "605c7sb1/tOhb3LnxAsxFGX", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "__prefab": null, + "_id": "35CwPVksdGoJPgBRCGSH6m" + }, { "__type__": "cc.Node", "_name": "Game", @@ -38,37 +206,37 @@ }, "_children": [ { - "__id__": 3 + "__id__": 13 }, { - "__id__": 5 + "__id__": 15 }, { - "__id__": 7 + "__id__": 17 }, { - "__id__": 9 + "__id__": 19 }, { - "__id__": 59 + "__id__": 69 }, { - "__id__": 65 + "__id__": 75 } ], "_active": true, "_components": [ { - "__id__": 116 + "__id__": 126 }, { - "__id__": 117 + "__id__": 127 }, { - "__id__": 118 + "__id__": 128 }, { - "__id__": 119 + "__id__": 129 } ], "_prefab": null, @@ -105,13 +273,13 @@ "_name": "HaloProjectileLauncher", "_objFlags": 0, "_parent": { - "__id__": 2 + "__id__": 12 }, "_children": [], "_active": true, "_components": [ { - "__id__": 4 + "__id__": 14 } ], "_prefab": null, @@ -148,7 +316,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 3 + "__id__": 13 }, "_enabled": true, "__prefab": null, @@ -163,13 +331,13 @@ "_name": "HorizontalProjectileLauncher", "_objFlags": 0, "_parent": { - "__id__": 2 + "__id__": 12 }, "_children": [], "_active": true, "_components": [ { - "__id__": 6 + "__id__": 16 } ], "_prefab": null, @@ -206,7 +374,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 5 + "__id__": 15 }, "_enabled": true, "__prefab": null, @@ -221,13 +389,13 @@ "_name": "DiagonalProjectileLauncher", "_objFlags": 0, "_parent": { - "__id__": 2 + "__id__": 12 }, "_children": [], "_active": true, "_components": [ { - "__id__": 8 + "__id__": 18 } ], "_prefab": null, @@ -264,7 +432,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 7 + "__id__": 17 }, "_enabled": true, "__prefab": null, @@ -279,29 +447,29 @@ "_name": "Player", "_objFlags": 0, "_parent": { - "__id__": 2 + "__id__": 12 }, "_children": [ { - "__id__": 10 + "__id__": 20 }, { - "__id__": 25 + "__id__": 35 } ], "_active": true, "_components": [ { - "__id__": 55 + "__id__": 65 }, { - "__id__": 56 + "__id__": 66 }, { - "__id__": 57 + "__id__": 67 }, { - "__id__": 58 + "__id__": 68 } ], "_prefab": null, @@ -338,20 +506,20 @@ "_name": "PlayerUI", "_objFlags": 0, "_parent": { - "__id__": 9 + "__id__": 19 }, "_children": [ { - "__id__": 11 + "__id__": 21 } ], "_active": true, "_components": [ { - "__id__": 23 + "__id__": 33 }, { - "__id__": 24 + "__id__": 34 } ], "_prefab": null, @@ -388,23 +556,23 @@ "_name": "PlayerHealthUI", "_objFlags": 0, "_parent": { - "__id__": 10 + "__id__": 20 }, "_children": [ { - "__id__": 12 + "__id__": 22 }, { - "__id__": 15 + "__id__": 25 } ], "_active": true, "_components": [ { - "__id__": 21 + "__id__": 31 }, { - "__id__": 22 + "__id__": 32 } ], "_prefab": null, @@ -441,16 +609,16 @@ "_name": "Background", "_objFlags": 0, "_parent": { - "__id__": 11 + "__id__": 21 }, "_children": [], "_active": true, "_components": [ { - "__id__": 13 + "__id__": 23 }, { - "__id__": 14 + "__id__": 24 } ], "_prefab": null, @@ -487,7 +655,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 12 + "__id__": 22 }, "_enabled": true, "__prefab": null, @@ -508,7 +676,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 12 + "__id__": 22 }, "_enabled": true, "__prefab": null, @@ -546,20 +714,20 @@ "_name": "HpBar", "_objFlags": 0, "_parent": { - "__id__": 11 + "__id__": 21 }, "_children": [ { - "__id__": 16 + "__id__": 26 } ], "_active": true, "_components": [ { - "__id__": 19 + "__id__": 29 }, { - "__id__": 20 + "__id__": 30 } ], "_prefab": null, @@ -596,16 +764,16 @@ "_name": "MovableBar", "_objFlags": 0, "_parent": { - "__id__": 15 + "__id__": 25 }, "_children": [], "_active": true, "_components": [ { - "__id__": 17 + "__id__": 27 }, { - "__id__": 18 + "__id__": 28 } ], "_prefab": null, @@ -642,7 +810,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 16 + "__id__": 26 }, "_enabled": true, "__prefab": null, @@ -663,7 +831,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 16 + "__id__": 26 }, "_enabled": true, "__prefab": null, @@ -701,7 +869,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 15 + "__id__": 25 }, "_enabled": true, "__prefab": null, @@ -722,12 +890,12 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 15 + "__id__": 25 }, "_enabled": true, "__prefab": null, "_barSprite": { - "__id__": 18 + "__id__": 28 }, "_mode": 0, "_totalLength": 80, @@ -740,7 +908,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 11 + "__id__": 21 }, "_enabled": true, "__prefab": null, @@ -761,12 +929,12 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 11 + "__id__": 21 }, "_enabled": true, "__prefab": null, "healthBar": { - "__id__": 20 + "__id__": 30 }, "_id": "8doWxm45ZCKLqr0rVRHJa2" }, @@ -775,7 +943,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 10 + "__id__": 20 }, "_enabled": true, "__prefab": null, @@ -796,12 +964,12 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 10 + "__id__": 20 }, "_enabled": true, "__prefab": null, "healthUI": { - "__id__": 22 + "__id__": 32 }, "_id": "49hVDAypRMuoVp+F+IPkXM" }, @@ -810,17 +978,17 @@ "_name": "Weapon", "_objFlags": 0, "_parent": { - "__id__": 9 + "__id__": 19 }, "_children": [ { - "__id__": 26 + "__id__": 36 } ], "_active": true, "_components": [ { - "__id__": 54 + "__id__": 64 } ], "_prefab": null, @@ -857,38 +1025,38 @@ "_name": "AnimatedWeapon", "_objFlags": 0, "_parent": { - "__id__": 25 + "__id__": 35 }, "_children": [ { - "__id__": 27 + "__id__": 37 }, { - "__id__": 31 + "__id__": 41 }, { - "__id__": 35 + "__id__": 45 }, { - "__id__": 39 + "__id__": 49 }, { - "__id__": 43 + "__id__": 53 }, { - "__id__": 47 + "__id__": 57 } ], "_active": true, "_components": [ { - "__id__": 51 + "__id__": 61 }, { - "__id__": 52 + "__id__": 62 }, { - "__id__": 53 + "__id__": 63 } ], "_prefab": null, @@ -925,19 +1093,19 @@ "_name": "WeaponCollider", "_objFlags": 0, "_parent": { - "__id__": 26 + "__id__": 36 }, "_children": [], "_active": true, "_components": [ { - "__id__": 28 + "__id__": 38 }, { - "__id__": 29 + "__id__": 39 }, { - "__id__": 30 + "__id__": 40 } ], "_prefab": null, @@ -974,7 +1142,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 27 + "__id__": 37 }, "_enabled": true, "__prefab": null, @@ -995,7 +1163,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 27 + "__id__": 37 }, "_enabled": true, "__prefab": null, @@ -1033,7 +1201,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 27 + "__id__": 37 }, "_enabled": true, "__prefab": null, @@ -1060,19 +1228,19 @@ "_name": "WeaponCollider-001", "_objFlags": 0, "_parent": { - "__id__": 26 + "__id__": 36 }, "_children": [], "_active": true, "_components": [ { - "__id__": 32 + "__id__": 42 }, { - "__id__": 33 + "__id__": 43 }, { - "__id__": 34 + "__id__": 44 } ], "_prefab": null, @@ -1109,7 +1277,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 31 + "__id__": 41 }, "_enabled": true, "__prefab": null, @@ -1130,7 +1298,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 31 + "__id__": 41 }, "_enabled": true, "__prefab": null, @@ -1168,7 +1336,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 31 + "__id__": 41 }, "_enabled": true, "__prefab": null, @@ -1195,19 +1363,19 @@ "_name": "WeaponCollider-002", "_objFlags": 0, "_parent": { - "__id__": 26 + "__id__": 36 }, "_children": [], "_active": true, "_components": [ { - "__id__": 36 + "__id__": 46 }, { - "__id__": 37 + "__id__": 47 }, { - "__id__": 38 + "__id__": 48 } ], "_prefab": null, @@ -1244,7 +1412,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 35 + "__id__": 45 }, "_enabled": true, "__prefab": null, @@ -1265,7 +1433,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 35 + "__id__": 45 }, "_enabled": true, "__prefab": null, @@ -1303,7 +1471,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 35 + "__id__": 45 }, "_enabled": true, "__prefab": null, @@ -1330,19 +1498,19 @@ "_name": "WeaponCollider-003", "_objFlags": 0, "_parent": { - "__id__": 26 + "__id__": 36 }, "_children": [], "_active": true, "_components": [ { - "__id__": 40 + "__id__": 50 }, { - "__id__": 41 + "__id__": 51 }, { - "__id__": 42 + "__id__": 52 } ], "_prefab": null, @@ -1379,7 +1547,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 39 + "__id__": 49 }, "_enabled": true, "__prefab": null, @@ -1400,7 +1568,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 39 + "__id__": 49 }, "_enabled": true, "__prefab": null, @@ -1438,7 +1606,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 39 + "__id__": 49 }, "_enabled": true, "__prefab": null, @@ -1465,19 +1633,19 @@ "_name": "WeaponCollider-004", "_objFlags": 0, "_parent": { - "__id__": 26 + "__id__": 36 }, "_children": [], "_active": true, "_components": [ { - "__id__": 44 + "__id__": 54 }, { - "__id__": 45 + "__id__": 55 }, { - "__id__": 46 + "__id__": 56 } ], "_prefab": null, @@ -1514,7 +1682,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 43 + "__id__": 53 }, "_enabled": true, "__prefab": null, @@ -1535,7 +1703,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 43 + "__id__": 53 }, "_enabled": true, "__prefab": null, @@ -1573,7 +1741,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 43 + "__id__": 53 }, "_enabled": true, "__prefab": null, @@ -1600,19 +1768,19 @@ "_name": "WeaponCollider-005", "_objFlags": 0, "_parent": { - "__id__": 26 + "__id__": 36 }, "_children": [], "_active": true, "_components": [ { - "__id__": 48 + "__id__": 58 }, { - "__id__": 49 + "__id__": 59 }, { - "__id__": 50 + "__id__": 60 } ], "_prefab": null, @@ -1649,7 +1817,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 47 + "__id__": 57 }, "_enabled": true, "__prefab": null, @@ -1670,7 +1838,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 47 + "__id__": 57 }, "_enabled": true, "__prefab": null, @@ -1708,7 +1876,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 47 + "__id__": 57 }, "_enabled": true, "__prefab": null, @@ -1735,7 +1903,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 26 + "__id__": 36 }, "_enabled": true, "__prefab": null, @@ -1756,7 +1924,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 26 + "__id__": 36 }, "_enabled": true, "__prefab": null, @@ -1778,28 +1946,28 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 26 + "__id__": 36 }, "_enabled": true, "__prefab": null, "colliders": [ { - "__id__": 30 + "__id__": 40 }, { - "__id__": 34 + "__id__": 44 }, { - "__id__": 38 + "__id__": 48 }, { - "__id__": 42 + "__id__": 52 }, { - "__id__": 46 + "__id__": 56 }, { - "__id__": 50 + "__id__": 60 } ], "_id": "efTecDVf5IyZOD5/n+1DG7" @@ -1809,15 +1977,15 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 25 + "__id__": 35 }, "_enabled": true, "__prefab": null, "weaponAnimation": { - "__id__": 52 + "__id__": 62 }, "upgradableCollider": { - "__id__": 53 + "__id__": 63 }, "_id": "femtdMmA5Ax5K78hjELCcD" }, @@ -1826,7 +1994,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 9 + "__id__": 19 }, "_enabled": true, "__prefab": null, @@ -1847,7 +2015,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 9 + "__id__": 19 }, "_enabled": true, "__prefab": null, @@ -1885,19 +2053,19 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 9 + "__id__": 19 }, "_enabled": true, "__prefab": null, "speed": 100, "collider": { - "__id__": 58 + "__id__": 68 }, "playerUI": { - "__id__": 24 + "__id__": 34 }, "weapon": { - "__id__": 54 + "__id__": 64 }, "_id": "5aDEGDNWpIaL+U2iIxK4vA" }, @@ -1906,7 +2074,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 9 + "__id__": 19 }, "_enabled": true, "__prefab": null, @@ -1933,20 +2101,20 @@ "_name": "EnemyManager", "_objFlags": 0, "_parent": { - "__id__": 2 + "__id__": 12 }, "_children": [ { - "__id__": 60 + "__id__": 70 }, { - "__id__": 62 + "__id__": 72 } ], "_active": true, "_components": [ { - "__id__": 64 + "__id__": 74 } ], "_prefab": null, @@ -1983,13 +2151,13 @@ "_name": "XPSpawner", "_objFlags": 0, "_parent": { - "__id__": 59 + "__id__": 69 }, "_children": [], "_active": true, "_components": [ { - "__id__": 61 + "__id__": 71 } ], "_prefab": null, @@ -2026,7 +2194,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 60 + "__id__": 70 }, "_enabled": true, "__prefab": null, @@ -2041,13 +2209,13 @@ "_name": "EnemySpawner", "_objFlags": 0, "_parent": { - "__id__": 59 + "__id__": 69 }, "_children": [], "_active": true, "_components": [ { - "__id__": 63 + "__id__": 73 } ], "_prefab": null, @@ -2084,7 +2252,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 62 + "__id__": 72 }, "_enabled": true, "__prefab": null, @@ -2101,15 +2269,15 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 59 + "__id__": 69 }, "_enabled": true, "__prefab": null, "enemySpawner": { - "__id__": 63 + "__id__": 73 }, "xpSpawner": { - "__id__": 61 + "__id__": 71 }, "_id": "1ffjazmm5IkZwKInsSIULY" }, @@ -2118,32 +2286,32 @@ "_name": "Camera", "_objFlags": 0, "_parent": { - "__id__": 2 + "__id__": 12 }, "_children": [ { - "__id__": 66 + "__id__": 76 }, { - "__id__": 89 + "__id__": 99 }, { - "__id__": 103 + "__id__": 113 }, { - "__id__": 106 + "__id__": 116 }, { - "__id__": 109 + "__id__": 119 }, { - "__id__": 112 + "__id__": 122 } ], "_active": true, "_components": [ { - "__id__": 115 + "__id__": 125 } ], "_prefab": null, @@ -2180,20 +2348,20 @@ "_name": "GameUI", "_objFlags": 0, "_parent": { - "__id__": 65 + "__id__": 75 }, "_children": [ { - "__id__": 67 + "__id__": 77 }, { - "__id__": 79 + "__id__": 89 } ], "_active": true, "_components": [ { - "__id__": 88 + "__id__": 98 } ], "_prefab": null, @@ -2230,20 +2398,20 @@ "_name": "TopUI", "_objFlags": 0, "_parent": { - "__id__": 66 + "__id__": 76 }, "_children": [ { - "__id__": 68 + "__id__": 78 } ], "_active": true, "_components": [ { - "__id__": 77 + "__id__": 87 }, { - "__id__": 78 + "__id__": 88 } ], "_prefab": null, @@ -2280,23 +2448,23 @@ "_name": "XpBar", "_objFlags": 0, "_parent": { - "__id__": 67 + "__id__": 77 }, "_children": [ { - "__id__": 69 + "__id__": 79 }, { - "__id__": 72 + "__id__": 82 } ], "_active": true, "_components": [ { - "__id__": 75 + "__id__": 85 }, { - "__id__": 76 + "__id__": 86 } ], "_prefab": null, @@ -2333,16 +2501,16 @@ "_name": "Background", "_objFlags": 0, "_parent": { - "__id__": 68 + "__id__": 78 }, "_children": [], "_active": true, "_components": [ { - "__id__": 70 + "__id__": 80 }, { - "__id__": 71 + "__id__": 81 } ], "_prefab": null, @@ -2379,7 +2547,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 69 + "__id__": 79 }, "_enabled": true, "__prefab": null, @@ -2400,7 +2568,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 69 + "__id__": 79 }, "_enabled": true, "__prefab": null, @@ -2438,16 +2606,16 @@ "_name": "MovableBar", "_objFlags": 0, "_parent": { - "__id__": 68 + "__id__": 78 }, "_children": [], "_active": true, "_components": [ { - "__id__": 73 + "__id__": 83 }, { - "__id__": 74 + "__id__": 84 } ], "_prefab": null, @@ -2484,7 +2652,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 72 + "__id__": 82 }, "_enabled": true, "__prefab": null, @@ -2505,7 +2673,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 72 + "__id__": 82 }, "_enabled": true, "__prefab": null, @@ -2543,7 +2711,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 68 + "__id__": 78 }, "_enabled": true, "__prefab": null, @@ -2564,12 +2732,12 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 68 + "__id__": 78 }, "_enabled": true, "__prefab": null, "_barSprite": { - "__id__": 74 + "__id__": 84 }, "_mode": 0, "_totalLength": 600, @@ -2582,7 +2750,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 67 + "__id__": 77 }, "_enabled": true, "__prefab": null, @@ -2603,7 +2771,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 67 + "__id__": 77 }, "_enabled": true, "__prefab": null, @@ -2632,17 +2800,17 @@ "_name": "UI", "_objFlags": 0, "_parent": { - "__id__": 66 + "__id__": 76 }, "_children": [ { - "__id__": 80 + "__id__": 90 } ], "_active": true, "_components": [ { - "__id__": 87 + "__id__": 97 } ], "_prefab": null, @@ -2679,23 +2847,23 @@ "_name": "VirtualJoystic", "_objFlags": 0, "_parent": { - "__id__": 79 + "__id__": 89 }, "_children": [ { - "__id__": 81 + "__id__": 91 } ], "_active": true, "_components": [ { - "__id__": 84 + "__id__": 94 }, { - "__id__": 85 + "__id__": 95 }, { - "__id__": 86 + "__id__": 96 } ], "_prefab": null, @@ -2732,16 +2900,16 @@ "_name": "Knob", "_objFlags": 0, "_parent": { - "__id__": 80 + "__id__": 90 }, "_children": [], "_active": true, "_components": [ { - "__id__": 82 + "__id__": 92 }, { - "__id__": 83 + "__id__": 93 } ], "_prefab": null, @@ -2778,7 +2946,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 81 + "__id__": 91 }, "_enabled": true, "__prefab": null, @@ -2799,7 +2967,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 81 + "__id__": 91 }, "_enabled": true, "__prefab": null, @@ -2837,7 +3005,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 80 + "__id__": 90 }, "_enabled": true, "__prefab": null, @@ -2858,7 +3026,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 80 + "__id__": 90 }, "_enabled": true, "__prefab": null, @@ -2896,13 +3064,13 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 80 + "__id__": 90 }, "_enabled": true, "__prefab": null, "maxDistance": 50, "knob": { - "__id__": 81 + "__id__": 91 }, "_id": "50ceZG62tGlYXvZWEvSDKl" }, @@ -2911,7 +3079,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 79 + "__id__": 89 }, "_enabled": true, "__prefab": null, @@ -2932,12 +3100,12 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 66 + "__id__": 76 }, "_enabled": true, "__prefab": null, "xpBar": { - "__id__": 76 + "__id__": 86 }, "_id": "bau/7eItRFrKKoAZZb/uYL" }, @@ -2946,20 +3114,20 @@ "_name": "ModalWindowManager", "_objFlags": 0, "_parent": { - "__id__": 65 + "__id__": 75 }, "_children": [ { - "__id__": 90 + "__id__": 100 } ], "_active": true, "_components": [ { - "__id__": 101 + "__id__": 111 }, { - "__id__": 102 + "__id__": 112 } ], "_prefab": null, @@ -2995,17 +3163,17 @@ "__type__": "cc.Node", "_objFlags": 0, "_parent": { - "__id__": 89 + "__id__": 99 }, "_prefab": { - "__id__": 91 + "__id__": 101 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 90 + "__id__": 100 }, "asset": { "__uuid__": "663674aa-da1c-44b0-8049-49db9b020973", @@ -3013,11 +3181,11 @@ }, "fileId": "32U/bJCUBDlaQxxGFNXZTu", "instance": { - "__id__": 92 + "__id__": 102 }, "targetOverrides": [ { - "__id__": 99 + "__id__": 109 } ] }, @@ -3028,19 +3196,19 @@ "mountedComponents": [], "propertyOverrides": [ { - "__id__": 93 + "__id__": 103 }, { - "__id__": 95 + "__id__": 105 }, { - "__id__": 96 + "__id__": 106 }, { - "__id__": 97 + "__id__": 107 }, { - "__id__": 98 + "__id__": 108 } ], "removedComponents": [] @@ -3048,7 +3216,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 94 + "__id__": 104 }, "propertyPath": [ "_name" @@ -3064,7 +3232,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 94 + "__id__": 104 }, "propertyPath": [ "_lpos" @@ -3079,7 +3247,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 94 + "__id__": 104 }, "propertyPath": [ "_lrot" @@ -3095,7 +3263,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 94 + "__id__": 104 }, "propertyPath": [ "_euler" @@ -3110,7 +3278,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 94 + "__id__": 104 }, "propertyPath": [ "_active" @@ -3127,7 +3295,7 @@ ], "target": null, "targetInfo": { - "__id__": 100 + "__id__": 110 } }, { @@ -3141,7 +3309,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 89 + "__id__": 99 }, "_enabled": true, "__prefab": null, @@ -3162,7 +3330,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 89 + "__id__": 99 }, "_enabled": true, "__prefab": null, @@ -3179,16 +3347,16 @@ "_name": "Sprite", "_objFlags": 0, "_parent": { - "__id__": 65 + "__id__": 75 }, "_children": [], "_active": true, "_components": [ { - "__id__": 104 + "__id__": 114 }, { - "__id__": 105 + "__id__": 115 } ], "_prefab": null, @@ -3225,7 +3393,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 103 + "__id__": 113 }, "_enabled": true, "__prefab": null, @@ -3246,7 +3414,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 103 + "__id__": 113 }, "_enabled": true, "__prefab": null, @@ -3284,16 +3452,16 @@ "_name": "Sprite-001", "_objFlags": 0, "_parent": { - "__id__": 65 + "__id__": 75 }, "_children": [], "_active": true, "_components": [ { - "__id__": 107 + "__id__": 117 }, { - "__id__": 108 + "__id__": 118 } ], "_prefab": null, @@ -3330,7 +3498,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 106 + "__id__": 116 }, "_enabled": true, "__prefab": null, @@ -3351,7 +3519,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 106 + "__id__": 116 }, "_enabled": true, "__prefab": null, @@ -3389,16 +3557,16 @@ "_name": "Sprite-002", "_objFlags": 0, "_parent": { - "__id__": 65 + "__id__": 75 }, "_children": [], "_active": true, "_components": [ { - "__id__": 110 + "__id__": 120 }, { - "__id__": 111 + "__id__": 121 } ], "_prefab": null, @@ -3435,7 +3603,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 109 + "__id__": 119 }, "_enabled": true, "__prefab": null, @@ -3456,7 +3624,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 109 + "__id__": 119 }, "_enabled": true, "__prefab": null, @@ -3494,16 +3662,16 @@ "_name": "Sprite-003", "_objFlags": 0, "_parent": { - "__id__": 65 + "__id__": 75 }, "_children": [], "_active": true, "_components": [ { - "__id__": 113 + "__id__": 123 }, { - "__id__": 114 + "__id__": 124 } ], "_prefab": null, @@ -3540,7 +3708,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 112 + "__id__": 122 }, "_enabled": true, "__prefab": null, @@ -3561,7 +3729,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 112 + "__id__": 122 }, "_enabled": true, "__prefab": null, @@ -3599,7 +3767,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 65 + "__id__": 75 }, "_enabled": true, "__prefab": null, @@ -3642,7 +3810,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 2 + "__id__": 12 }, "_enabled": true, "__prefab": null, @@ -3663,12 +3831,12 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 2 + "__id__": 12 }, "_enabled": true, "__prefab": null, "_cameraComponent": { - "__id__": 115 + "__id__": 125 }, "_alignCanvasWithScreen": true, "_id": "12O/ljcVlEqLmVm3U2gEOQ" @@ -3678,7 +3846,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 2 + "__id__": 12 }, "_enabled": true, "__prefab": null, @@ -3707,36 +3875,36 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 2 + "__id__": 12 }, "_enabled": true, "__prefab": null, "virtualJoystic": { - "__id__": 86 + "__id__": 96 }, "player": { - "__id__": 57 + "__id__": 67 }, "haloProjectileLauncherComponent": { - "__id__": 4 + "__id__": 14 }, "horizontalProjectileLauncherComponent": { - "__id__": 6 + "__id__": 16 }, "diagonalProjectileLauncherComponent": { - "__id__": 8 + "__id__": 18 }, "enemyManager": { - "__id__": 64 + "__id__": 74 }, "camera": { - "__id__": 115 + "__id__": 125 }, "gameUI": { - "__id__": 88 + "__id__": 98 }, "modalWindowManager": { - "__id__": 102 + "__id__": 112 }, "settingsAsset": { "__uuid__": "6828fb79-0a56-437e-b718-9f43bf234fbc", @@ -3749,26 +3917,29 @@ "fileId": "cffa5b19-2043-4cef-8221-1a10ab7a2c1f", "nestedPrefabInstanceRoots": [ { - "__id__": 90 + "__id__": 2 + }, + { + "__id__": 100 } ] }, { "__type__": "cc.SceneGlobals", "ambient": { - "__id__": 122 + "__id__": 132 }, "shadows": { - "__id__": 123 + "__id__": 133 }, "_skybox": { - "__id__": 124 + "__id__": 134 }, "fog": { - "__id__": 125 + "__id__": 135 }, "octree": { - "__id__": 126 + "__id__": 136 } }, { diff --git a/assets/Scenes/Menu.scene b/assets/Scenes/Menu.scene index 93de741..9c846d6 100644 --- a/assets/Scenes/Menu.scene +++ b/assets/Scenes/Menu.scene @@ -18,30 +18,199 @@ "__id__": 2 }, { - "__id__": 4 + "__id__": 10 } ], "_active": true, "_components": [], - "_prefab": null, + "_prefab": { + "__id__": 20 + }, "autoReleaseAssets": false, "_globals": { - "__id__": 12 + "__id__": 21 }, "_id": "1a3bccb5-bbb7-4058-846c-ed41b52415b0" }, { "__type__": "cc.Node", - "_name": "AppRoot", "_objFlags": 0, "_parent": { "__id__": 1 }, + "_prefab": { + "__id__": 3 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "2e5e69ef-0211-425c-9580-f5e760127619", + "__expectedType__": "cc.Prefab" + }, + "fileId": "f6TS0IBq9EGpNVBB7WXcF6", + "instance": { + "__id__": 4 + } + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "aeBYrvCbhJPrl9WFxYv6HW", + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 5 + }, + { + "__id__": 7 + }, + { + "__id__": 8 + }, + { + "__id__": 9 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 6 + }, + "propertyPath": [ + "_name" + ], + "value": "AppRoot" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "f6TS0IBq9EGpNVBB7WXcF6" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 6 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 6 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 6 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "cc.Node", + "_name": "Menu", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 11 + }, + { + "__id__": 13 + } + ], + "_active": true, + "_components": [ + { + "__id__": 16 + }, + { + "__id__": 17 + }, + { + "__id__": 18 + }, + { + "__id__": 19 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 320, + "y": 480, + "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": "1bbjilihVLsrcjC6Bkf6/2" + }, + { + "__type__": "cc.Node", + "_name": "Camera", + "_objFlags": 0, + "_parent": { + "__id__": 10 + }, "_children": [], "_active": true, "_components": [ { - "__id__": 3 + "__id__": 12 } ], "_prefab": null, @@ -49,7 +218,7 @@ "__type__": "cc.Vec3", "x": 0, "y": 0, - "z": 0 + "z": 1000 }, "_lrot": { "__type__": "cc.Quat", @@ -71,90 +240,66 @@ "y": 0, "z": 0 }, - "_id": "58b/Etqn1D0LBB1esUnUos" + "_id": "00gMEox2dKs5OZF6dNq6Ph" }, { - "__type__": "4943dSvt9FBvLizJ1HhFOzg", + "__type__": "cc.Camera", "_name": "", "_objFlags": 0, "node": { - "__id__": 2 + "__id__": 11 }, "_enabled": true, "__prefab": null, - "_id": "eeXuVZFQ1KNpRron3jnCKj" - }, - { - "__type__": "cc.Node", - "_name": "Menu", - "_objFlags": 0, - "_parent": { - "__id__": 1 + "_projection": 0, + "_priority": 1073741824, + "_fov": 45, + "_fovAxis": 0, + "_orthoHeight": 480, + "_near": 1, + "_far": 2000, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 }, - "_children": [ - { - "__id__": 5 - } - ], - "_active": true, - "_components": [ - { - "__id__": 9 - }, - { - "__id__": 10 - }, - { - "__id__": 11 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 320, - "y": 480.00000000000006, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", + "_depth": 1, + "_stencil": 0, + "_clearFlags": 6, + "_rect": { + "__type__": "cc.Rect", "x": 0, "y": 0, - "z": 0, - "w": 1 + "width": 1, + "height": 1 }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "beI88Z2HpFELqR4T5EMHpg" + "_aperture": 19, + "_shutter": 7, + "_iso": 0, + "_screenScale": 1, + "_visibility": 41943040, + "_targetTexture": null, + "_cameraType": -1, + "_trackingType": 0, + "_id": "31ELbgwJ1B7oQPudIYOXn5" }, { "__type__": "cc.Node", "_name": "Sprite", "_objFlags": 0, "_parent": { - "__id__": 4 + "__id__": 10 }, "_children": [], "_active": true, "_components": [ { - "__id__": 6 + "__id__": 14 }, { - "__id__": 7 - }, - { - "__id__": 8 + "__id__": 15 } ], "_prefab": null, @@ -184,20 +329,20 @@ "y": 0, "z": 0 }, - "_id": "d48yPBDBxC0rb7vKh/2se2" + "_id": "e8TprDYH9A/q3+npC+6JfK" }, { "__type__": "cc.UITransform", "_name": "", "_objFlags": 0, "node": { - "__id__": 5 + "__id__": 13 }, "_enabled": true, "__prefab": null, "_contentSize": { "__type__": "cc.Size", - "width": 40, + "width": 102.2, "height": 40 }, "_anchorPoint": { @@ -205,14 +350,14 @@ "x": 0.5, "y": 0.5 }, - "_id": "73Y2tSGG9AkLjwor4zDIda" + "_id": "3bM1/JCd5CI4KtT2wE4DLx" }, { "__type__": "cc.Sprite", "_name": "", "_objFlags": 0, "node": { - "__id__": 5 + "__id__": 13 }, "_enabled": true, "__prefab": null, @@ -221,8 +366,8 @@ "_dstBlendFactor": 4, "_color": { "__type__": "cc.Color", - "r": 235, - "g": 2, + "r": 255, + "g": 255, "b": 255, "a": 255 }, @@ -232,7 +377,7 @@ }, "_type": 0, "_fillType": 0, - "_sizeMode": 1, + "_sizeMode": 0, "_fillCenter": { "__type__": "cc.Vec2", "x": 0, @@ -243,25 +388,14 @@ "_isTrimmedMode": true, "_useGrayscale": false, "_atlas": null, - "_id": "72StvrPGhHK4bp9R7RA2NO" - }, - { - "__type__": "22c61zFd7hNRaAttffaS6ep", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 5 - }, - "_enabled": true, - "__prefab": null, - "_id": "0e1btqtltATbmaReZXZW4r" + "_id": "61f5gttftKjJUo3WDA6ZG3" }, { "__type__": "cc.UITransform", "_name": "", "_objFlags": 0, "node": { - "__id__": 4 + "__id__": 10 }, "_enabled": true, "__prefab": null, @@ -275,14 +409,29 @@ "x": 0.5, "y": 0.5 }, - "_id": "d6rUX5yfhMlKoWX2bSbawx" + "_id": "77sRtbA2xDJKLPTTLUxbE9" + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "__prefab": null, + "_cameraComponent": { + "__id__": 12 + }, + "_alignCanvasWithScreen": true, + "_id": "eeGIEoaYNDCIMhXubllIM7" }, { "__type__": "cc.Widget", "_name": "", "_objFlags": 0, "node": { - "__id__": 4 + "__id__": 10 }, "_enabled": true, "__prefab": null, @@ -290,8 +439,8 @@ "_target": null, "_left": 0, "_right": 0, - "_top": 5.684341886080802e-14, - "_bottom": 5.684341886080802e-14, + "_top": 0, + "_bottom": 0, "_horizontalCenter": 0, "_verticalCenter": 0, "_isAbsLeft": true, @@ -304,35 +453,44 @@ "_originalHeight": 0, "_alignMode": 2, "_lockFlags": 0, - "_id": "c5V1EV8IpMtrIvY1OE9t2u" + "_id": "72JoP41fdMTK8qAaheLgpm" }, { - "__type__": "cc.RenderRoot2D", + "__type__": "22c61zFd7hNRaAttffaS6ep", "_name": "", "_objFlags": 0, "node": { - "__id__": 4 + "__id__": 10 }, "_enabled": true, "__prefab": null, - "_id": "2aCNE8+JdDk581XA25TXI9" + "_id": "12ZDz/3H9Ff76Ay4iDl43K" + }, + { + "__type__": "cc.PrefabInfo", + "fileId": "1a3bccb5-bbb7-4058-846c-ed41b52415b0", + "nestedPrefabInstanceRoots": [ + { + "__id__": 2 + } + ] }, { "__type__": "cc.SceneGlobals", "ambient": { - "__id__": 13 + "__id__": 22 }, "shadows": { - "__id__": 14 + "__id__": 23 }, "_skybox": { - "__id__": 15 + "__id__": 24 }, "fog": { - "__id__": 16 + "__id__": 25 }, "octree": { - "__id__": 17 + "__id__": 26 } }, { diff --git a/assets/Scripts/Game/TestGameRunner.ts b/assets/Scripts/Game/TestGameRunner.ts new file mode 100644 index 0000000..6775e66 --- /dev/null +++ b/assets/Scripts/Game/TestGameRunner.ts @@ -0,0 +1,18 @@ +import { Component, _decorator } from "cc"; +import { GameRunner } from "../Menu/GameRunner"; +import { delay } from "../Services/Utils/AsyncUtils"; +import { Game } from "./Game"; +const { ccclass } = _decorator; + +@ccclass("TestGameRunner") +export class TestGameRunner extends Component { + public start(): void { + if (GameRunner.Instance.IsRunning) return; + this.playTestGameAsync(); + } + + public async playTestGameAsync(): Promise { + while (Game.Instance == null) await delay(100); + Game.Instance.playGame(); + } +} diff --git a/assets/Scripts/Game/TestGameRunner.ts.meta b/assets/Scripts/Game/TestGameRunner.ts.meta new file mode 100644 index 0000000..50e36f0 --- /dev/null +++ b/assets/Scripts/Game/TestGameRunner.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "605c7b1b-d7fb-4e85-bdcb-9f102cc45197", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/Scripts/Menu/GameRunner.ts b/assets/Scripts/Menu/GameRunner.ts index 0b9494c..f469de1 100644 --- a/assets/Scripts/Menu/GameRunner.ts +++ b/assets/Scripts/Menu/GameRunner.ts @@ -7,6 +7,8 @@ import { delay } from "../Services/Utils/AsyncUtils"; export class GameRunner { private static instance: GameRunner = new GameRunner(); + private isRunning = false; + // eslint-disable-next-line @typescript-eslint/no-empty-function private constructor() {} @@ -14,7 +16,12 @@ export class GameRunner { return this.instance; } + public get IsRunning(): boolean { + return this.isRunning; + } + public async playGame(): Promise { + this.isRunning = true; director.loadScene("Game"); const userData: UserData = AppRoot.Instance.SaveSystem.load(); while (Game.Instance == null) await delay(10); @@ -24,5 +31,7 @@ export class GameRunner { console.log("Gold coins: " + result); console.log("All gold coins: " + userData.game.goldCoins); + + this.isRunning = false; } } diff --git a/assets/Scripts/Menu/Menu.ts b/assets/Scripts/Menu/Menu.ts index 671b32d..6b0eca4 100644 --- a/assets/Scripts/Menu/Menu.ts +++ b/assets/Scripts/Menu/Menu.ts @@ -1,10 +1,11 @@ import { _decorator, Component, Node } from "cc"; + import { GameRunner } from "./GameRunner"; const { ccclass, property } = _decorator; @ccclass("Menu") export class Menu extends Component { - public start(): void { + public async start(): Promise { GameRunner.Instance.playGame(); } } diff --git a/assets/Scripts/Utils.meta b/assets/Scripts/Utils.meta new file mode 100644 index 0000000..9b66bc6 --- /dev/null +++ b/assets/Scripts/Utils.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "a90f4b1c-a934-4656-b7b0-e60a0cfcfd24", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +}