From 55571cded90be6f3d47717a8ee542162795e3aef Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 28 Nov 2022 12:19:04 +0100 Subject: [PATCH] Folder structure --- assets/Scenes/scene.scene | 7 ++++++- .../Scripts/Game/Collision/PlayerCollisionSystem.ts | 2 +- .../Scripts/Game/Collision/WeaponCollisionSystem.ts | 2 +- assets/Scripts/Game/GameBootstrapper.ts | 6 +++--- assets/Scripts/Game/UI/GameUI.ts | 3 ++- assets/Scripts/Game/Unit.meta | 12 ++++++++++++ assets/Scripts/Game/{ => Unit}/Enemy.meta | 0 assets/Scripts/Game/{ => Unit}/Enemy/Enemy.ts | 7 ++++--- assets/Scripts/Game/{ => Unit}/Enemy/Enemy.ts.meta | 0 assets/Scripts/Game/{ => Unit}/Enemy/EnemyManager.ts | 2 +- .../Game/{ => Unit}/Enemy/EnemyManager.ts.meta | 0 assets/Scripts/Game/{ => Unit}/Enemy/EnemyMover.ts | 0 .../Scripts/Game/{ => Unit}/Enemy/EnemyMover.ts.meta | 0 assets/Scripts/Game/{ => Unit}/Enemy/EnemySpawner.ts | 9 +++++---- .../Game/{ => Unit}/Enemy/EnemySpawner.ts.meta | 0 assets/Scripts/Game/{ => Unit}/Player.meta | 0 assets/Scripts/Game/{ => Unit}/Player/Player.ts | 11 ++++++----- assets/Scripts/Game/{ => Unit}/Player/Player.ts.meta | 0 assets/Scripts/Game/{ => Unit}/Player/PlayerUI.meta | 0 .../{ => Unit}/Player/PlayerUI/PlayerHealthUI.ts | 0 .../Player/PlayerUI/PlayerHealthUI.ts.meta | 0 .../Game/{ => Unit}/Player/PlayerUI/PlayerUI.ts | 0 .../Game/{ => Unit}/Player/PlayerUI/PlayerUI.ts.meta | 0 assets/Scripts/Game/{ => Unit}/Player/Weapon.meta | 0 .../{ => Unit}/Player/Weapon/UpgradableCollider.ts | 4 ++-- .../Player/Weapon/UpgradableCollider.ts.meta | 0 .../Scripts/Game/{ => Unit}/Player/Weapon/Weapon.ts | 4 ++-- .../Game/{ => Unit}/Player/Weapon/Weapon.ts.meta | 0 assets/Scripts/Game/{Player => Unit}/UnitHealth.ts | 0 .../Scripts/Game/{Player => Unit}/UnitHealth.ts.meta | 0 assets/Scripts/Game/{Player => Unit}/UnitLevel.ts | 0 .../Scripts/Game/{Player => Unit}/UnitLevel.ts.meta | 0 32 files changed, 45 insertions(+), 24 deletions(-) create mode 100644 assets/Scripts/Game/Unit.meta rename assets/Scripts/Game/{ => Unit}/Enemy.meta (100%) rename assets/Scripts/Game/{ => Unit}/Enemy/Enemy.ts (88%) rename assets/Scripts/Game/{ => Unit}/Enemy/Enemy.ts.meta (100%) rename assets/Scripts/Game/{ => Unit}/Enemy/EnemyManager.ts (96%) rename assets/Scripts/Game/{ => Unit}/Enemy/EnemyManager.ts.meta (100%) rename assets/Scripts/Game/{ => Unit}/Enemy/EnemyMover.ts (100%) rename assets/Scripts/Game/{ => Unit}/Enemy/EnemyMover.ts.meta (100%) rename assets/Scripts/Game/{ => Unit}/Enemy/EnemySpawner.ts (86%) rename assets/Scripts/Game/{ => Unit}/Enemy/EnemySpawner.ts.meta (100%) rename assets/Scripts/Game/{ => Unit}/Player.meta (100%) rename assets/Scripts/Game/{ => Unit}/Player/Player.ts (85%) rename assets/Scripts/Game/{ => Unit}/Player/Player.ts.meta (100%) rename assets/Scripts/Game/{ => Unit}/Player/PlayerUI.meta (100%) rename assets/Scripts/Game/{ => Unit}/Player/PlayerUI/PlayerHealthUI.ts (100%) rename assets/Scripts/Game/{ => Unit}/Player/PlayerUI/PlayerHealthUI.ts.meta (100%) rename assets/Scripts/Game/{ => Unit}/Player/PlayerUI/PlayerUI.ts (100%) rename assets/Scripts/Game/{ => Unit}/Player/PlayerUI/PlayerUI.ts.meta (100%) rename assets/Scripts/Game/{ => Unit}/Player/Weapon.meta (100%) rename assets/Scripts/Game/{ => Unit}/Player/Weapon/UpgradableCollider.ts (90%) rename assets/Scripts/Game/{ => Unit}/Player/Weapon/UpgradableCollider.ts.meta (100%) rename assets/Scripts/Game/{ => Unit}/Player/Weapon/Weapon.ts (93%) rename assets/Scripts/Game/{ => Unit}/Player/Weapon/Weapon.ts.meta (100%) rename assets/Scripts/Game/{Player => Unit}/UnitHealth.ts (100%) rename assets/Scripts/Game/{Player => Unit}/UnitHealth.ts.meta (100%) rename assets/Scripts/Game/{Player => Unit}/UnitLevel.ts (100%) rename assets/Scripts/Game/{Player => Unit}/UnitLevel.ts.meta (100%) diff --git a/assets/Scenes/scene.scene b/assets/Scenes/scene.scene index b6bfd17..27facd7 100644 --- a/assets/Scenes/scene.scene +++ b/assets/Scenes/scene.scene @@ -1633,6 +1633,9 @@ }, "_enabled": true, "__prefab": null, + "healthUI": { + "__id__": 46 + }, "_id": "49hVDAypRMuoVp+F+IPkXM" }, { @@ -1707,7 +1710,9 @@ "collider": { "__id__": 52 }, - "playerUI": null, + "playerUI": { + "__id__": 48 + }, "_id": "5aDEGDNWpIaL+U2iIxK4vA" }, { diff --git a/assets/Scripts/Game/Collision/PlayerCollisionSystem.ts b/assets/Scripts/Game/Collision/PlayerCollisionSystem.ts index eb2f6e9..aeb7b3e 100644 --- a/assets/Scripts/Game/Collision/PlayerCollisionSystem.ts +++ b/assets/Scripts/Game/Collision/PlayerCollisionSystem.ts @@ -2,8 +2,8 @@ import { Collider2D, Contact2DType } from "cc"; import { GroupType } from "../GroupType"; import { Player } from "../Unit/Player/Player"; import { GameTimer } from "../../Services/GameTimer"; -import { Enemy } from "../Enemy/Enemy"; import { XP } from "../XP/XP"; +import { Enemy } from "../Unit/Enemy/Enemy"; export class PlayerCollisionSystem { private playerContacts: Collider2D[] = []; diff --git a/assets/Scripts/Game/Collision/WeaponCollisionSystem.ts b/assets/Scripts/Game/Collision/WeaponCollisionSystem.ts index a8d67f4..57b2d1a 100644 --- a/assets/Scripts/Game/Collision/WeaponCollisionSystem.ts +++ b/assets/Scripts/Game/Collision/WeaponCollisionSystem.ts @@ -1,5 +1,5 @@ import { Collider2D } from "cc"; -import { Enemy } from "../Enemy/Enemy"; +import { Enemy } from "../Unit/Enemy/Enemy"; import { Weapon } from "../Unit/Player/Weapon/Weapon"; export class WeaponCollisionSystem { diff --git a/assets/Scripts/Game/GameBootstrapper.ts b/assets/Scripts/Game/GameBootstrapper.ts index 50cbf69..e48f85b 100644 --- a/assets/Scripts/Game/GameBootstrapper.ts +++ b/assets/Scripts/Game/GameBootstrapper.ts @@ -3,15 +3,15 @@ import { ModalWindowManager } from "../Services/ModalWindowSystem/ModalWindowMan import { PlayerCollisionSystem } from "./Collision/PlayerCollisionSystem"; import { WeaponCollisionSystem } from "./Collision/WeaponCollisionSystem"; import { GameSettings } from "./Data/GameSettings"; -import { EnemyManager } from "./Enemy/EnemyManager"; import { KeyboardInput } from "./Input/KeyboardInput"; import { MultiInput } from "./Input/MultiInput"; import { VirtualJoystic } from "./Input/VirtualJoystic"; import { GameModalLauncher } from "./ModalWIndows/GameModalLauncher"; import { Pauser } from "./Pauser"; -import { Player } from "./Player/Player"; -import { Weapon } from "./Player/Weapon/Weapon"; import { GameUI } from "./UI/GameUI"; +import { EnemyManager } from "./Unit/Enemy/EnemyManager"; +import { Player } from "./Unit/Player/Player"; +import { Weapon } from "./Unit/Player/Weapon/Weapon"; import { Upgrader } from "./Upgrades/Upgrader"; const { ccclass, property } = _decorator; diff --git a/assets/Scripts/Game/UI/GameUI.ts b/assets/Scripts/Game/UI/GameUI.ts index f29881f..5053045 100644 --- a/assets/Scripts/Game/UI/GameUI.ts +++ b/assets/Scripts/Game/UI/GameUI.ts @@ -1,6 +1,7 @@ import { Component, ProgressBar, _decorator } from "cc"; import { Player } from "../Unit/Player/Player"; -import { UnitLevel } from "../Unit/Player/UnitLevel"; +import { UnitLevel } from "../Unit/UnitLevel"; + const { ccclass, property } = _decorator; @ccclass("GameUI") diff --git a/assets/Scripts/Game/Unit.meta b/assets/Scripts/Game/Unit.meta new file mode 100644 index 0000000..5cc059f --- /dev/null +++ b/assets/Scripts/Game/Unit.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "ad08b9f7-7fbc-424b-b963-fde7717fcd77", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/assets/Scripts/Game/Enemy.meta b/assets/Scripts/Game/Unit/Enemy.meta similarity index 100% rename from assets/Scripts/Game/Enemy.meta rename to assets/Scripts/Game/Unit/Enemy.meta diff --git a/assets/Scripts/Game/Enemy/Enemy.ts b/assets/Scripts/Game/Unit/Enemy/Enemy.ts similarity index 88% rename from assets/Scripts/Game/Enemy/Enemy.ts rename to assets/Scripts/Game/Unit/Enemy/Enemy.ts index 9410682..6fdb677 100644 --- a/assets/Scripts/Game/Enemy/Enemy.ts +++ b/assets/Scripts/Game/Unit/Enemy/Enemy.ts @@ -1,7 +1,8 @@ import { BoxCollider2D, Component, randomRange, Vec3, _decorator } from "cc"; -import { ISignal } from "../../Services/EventSystem/ISignal"; -import { Signal } from "../../Services/EventSystem/Signal"; -import { UnitHealth } from "../Player/UnitHealth"; +import { ISignal } from "../../../Services/EventSystem/ISignal"; +import { Signal } from "../../../Services/EventSystem/Signal"; +import { UnitHealth } from "../UnitHealth"; + const { ccclass, property } = _decorator; @ccclass("Enemy") diff --git a/assets/Scripts/Game/Enemy/Enemy.ts.meta b/assets/Scripts/Game/Unit/Enemy/Enemy.ts.meta similarity index 100% rename from assets/Scripts/Game/Enemy/Enemy.ts.meta rename to assets/Scripts/Game/Unit/Enemy/Enemy.ts.meta diff --git a/assets/Scripts/Game/Enemy/EnemyManager.ts b/assets/Scripts/Game/Unit/Enemy/EnemyManager.ts similarity index 96% rename from assets/Scripts/Game/Enemy/EnemyManager.ts rename to assets/Scripts/Game/Unit/Enemy/EnemyManager.ts index 2edd2e7..846ae2a 100644 --- a/assets/Scripts/Game/Enemy/EnemyManager.ts +++ b/assets/Scripts/Game/Unit/Enemy/EnemyManager.ts @@ -1,5 +1,5 @@ import { Component, Node, _decorator } from "cc"; -import { XPSpawner } from "../XP/XPSpawner"; +import { XPSpawner } from "../../XP/XPSpawner"; import { Enemy } from "./Enemy"; import { EnemyMover } from "./EnemyMover"; import { EnemySpawner } from "./EnemySpawner"; diff --git a/assets/Scripts/Game/Enemy/EnemyManager.ts.meta b/assets/Scripts/Game/Unit/Enemy/EnemyManager.ts.meta similarity index 100% rename from assets/Scripts/Game/Enemy/EnemyManager.ts.meta rename to assets/Scripts/Game/Unit/Enemy/EnemyManager.ts.meta diff --git a/assets/Scripts/Game/Enemy/EnemyMover.ts b/assets/Scripts/Game/Unit/Enemy/EnemyMover.ts similarity index 100% rename from assets/Scripts/Game/Enemy/EnemyMover.ts rename to assets/Scripts/Game/Unit/Enemy/EnemyMover.ts diff --git a/assets/Scripts/Game/Enemy/EnemyMover.ts.meta b/assets/Scripts/Game/Unit/Enemy/EnemyMover.ts.meta similarity index 100% rename from assets/Scripts/Game/Enemy/EnemyMover.ts.meta rename to assets/Scripts/Game/Unit/Enemy/EnemyMover.ts.meta diff --git a/assets/Scripts/Game/Enemy/EnemySpawner.ts b/assets/Scripts/Game/Unit/Enemy/EnemySpawner.ts similarity index 86% rename from assets/Scripts/Game/Enemy/EnemySpawner.ts rename to assets/Scripts/Game/Unit/Enemy/EnemySpawner.ts index e18819e..3bd859a 100644 --- a/assets/Scripts/Game/Enemy/EnemySpawner.ts +++ b/assets/Scripts/Game/Unit/Enemy/EnemySpawner.ts @@ -1,8 +1,9 @@ import { Component, Prefab, randomRange, Vec3, _decorator, Node } from "cc"; -import { ISignal } from "../../Services/EventSystem/ISignal"; -import { Signal } from "../../Services/EventSystem/Signal"; -import { GameTimer } from "../../Services/GameTimer"; -import { ObjectPool } from "../../Services/ObjectPool"; +import { ISignal } from "../../../Services/EventSystem/ISignal"; +import { Signal } from "../../../Services/EventSystem/Signal"; +import { GameTimer } from "../../../Services/GameTimer"; +import { ObjectPool } from "../../../Services/ObjectPool"; + import { Enemy } from "./Enemy"; const { ccclass, property } = _decorator; diff --git a/assets/Scripts/Game/Enemy/EnemySpawner.ts.meta b/assets/Scripts/Game/Unit/Enemy/EnemySpawner.ts.meta similarity index 100% rename from assets/Scripts/Game/Enemy/EnemySpawner.ts.meta rename to assets/Scripts/Game/Unit/Enemy/EnemySpawner.ts.meta diff --git a/assets/Scripts/Game/Player.meta b/assets/Scripts/Game/Unit/Player.meta similarity index 100% rename from assets/Scripts/Game/Player.meta rename to assets/Scripts/Game/Unit/Player.meta diff --git a/assets/Scripts/Game/Player/Player.ts b/assets/Scripts/Game/Unit/Player/Player.ts similarity index 85% rename from assets/Scripts/Game/Player/Player.ts rename to assets/Scripts/Game/Unit/Player/Player.ts index 9b09d75..c40b1d5 100644 --- a/assets/Scripts/Game/Player/Player.ts +++ b/assets/Scripts/Game/Unit/Player/Player.ts @@ -1,9 +1,10 @@ -import { BoxCollider2D, Collider2D, Component, PointToPointConstraint, Vec2, Vec3, _decorator } from "cc"; -import { IInput } from "../Input/IInput"; -import { Weapon } from "../Weapon"; +import { BoxCollider2D, Collider2D, Component, Vec2, Vec3, _decorator } from "cc"; +import { IInput } from "../../Input/IInput"; +import { UnitHealth } from "../UnitHealth"; +import { UnitLevel } from "../UnitLevel"; import { PlayerUI } from "./PlayerUI/PlayerUI"; -import { UnitHealth } from "./UnitHealth"; -import { UnitLevel } from "./UnitLevel"; +import { Weapon } from "./Weapon/Weapon"; + const { ccclass, property } = _decorator; @ccclass("Player") diff --git a/assets/Scripts/Game/Player/Player.ts.meta b/assets/Scripts/Game/Unit/Player/Player.ts.meta similarity index 100% rename from assets/Scripts/Game/Player/Player.ts.meta rename to assets/Scripts/Game/Unit/Player/Player.ts.meta diff --git a/assets/Scripts/Game/Player/PlayerUI.meta b/assets/Scripts/Game/Unit/Player/PlayerUI.meta similarity index 100% rename from assets/Scripts/Game/Player/PlayerUI.meta rename to assets/Scripts/Game/Unit/Player/PlayerUI.meta diff --git a/assets/Scripts/Game/Player/PlayerUI/PlayerHealthUI.ts b/assets/Scripts/Game/Unit/Player/PlayerUI/PlayerHealthUI.ts similarity index 100% rename from assets/Scripts/Game/Player/PlayerUI/PlayerHealthUI.ts rename to assets/Scripts/Game/Unit/Player/PlayerUI/PlayerHealthUI.ts diff --git a/assets/Scripts/Game/Player/PlayerUI/PlayerHealthUI.ts.meta b/assets/Scripts/Game/Unit/Player/PlayerUI/PlayerHealthUI.ts.meta similarity index 100% rename from assets/Scripts/Game/Player/PlayerUI/PlayerHealthUI.ts.meta rename to assets/Scripts/Game/Unit/Player/PlayerUI/PlayerHealthUI.ts.meta diff --git a/assets/Scripts/Game/Player/PlayerUI/PlayerUI.ts b/assets/Scripts/Game/Unit/Player/PlayerUI/PlayerUI.ts similarity index 100% rename from assets/Scripts/Game/Player/PlayerUI/PlayerUI.ts rename to assets/Scripts/Game/Unit/Player/PlayerUI/PlayerUI.ts diff --git a/assets/Scripts/Game/Player/PlayerUI/PlayerUI.ts.meta b/assets/Scripts/Game/Unit/Player/PlayerUI/PlayerUI.ts.meta similarity index 100% rename from assets/Scripts/Game/Player/PlayerUI/PlayerUI.ts.meta rename to assets/Scripts/Game/Unit/Player/PlayerUI/PlayerUI.ts.meta diff --git a/assets/Scripts/Game/Player/Weapon.meta b/assets/Scripts/Game/Unit/Player/Weapon.meta similarity index 100% rename from assets/Scripts/Game/Player/Weapon.meta rename to assets/Scripts/Game/Unit/Player/Weapon.meta diff --git a/assets/Scripts/Game/Player/Weapon/UpgradableCollider.ts b/assets/Scripts/Game/Unit/Player/Weapon/UpgradableCollider.ts similarity index 90% rename from assets/Scripts/Game/Player/Weapon/UpgradableCollider.ts rename to assets/Scripts/Game/Unit/Player/Weapon/UpgradableCollider.ts index ea4f8f1..25b1ecc 100644 --- a/assets/Scripts/Game/Player/Weapon/UpgradableCollider.ts +++ b/assets/Scripts/Game/Unit/Player/Weapon/UpgradableCollider.ts @@ -1,6 +1,6 @@ import { BoxCollider2D, Collider2D, Component, Contact2DType, _decorator } from "cc"; -import { ISignal } from "../../../Services/EventSystem/ISignal"; -import { Signal } from "../../../Services/EventSystem/Signal"; +import { ISignal } from "../../../../Services/EventSystem/ISignal"; +import { Signal } from "../../../../Services/EventSystem/Signal"; const { ccclass, property } = _decorator; diff --git a/assets/Scripts/Game/Player/Weapon/UpgradableCollider.ts.meta b/assets/Scripts/Game/Unit/Player/Weapon/UpgradableCollider.ts.meta similarity index 100% rename from assets/Scripts/Game/Player/Weapon/UpgradableCollider.ts.meta rename to assets/Scripts/Game/Unit/Player/Weapon/UpgradableCollider.ts.meta diff --git a/assets/Scripts/Game/Player/Weapon/Weapon.ts b/assets/Scripts/Game/Unit/Player/Weapon/Weapon.ts similarity index 93% rename from assets/Scripts/Game/Player/Weapon/Weapon.ts rename to assets/Scripts/Game/Unit/Player/Weapon/Weapon.ts index 6ee5c92..7f02f26 100644 --- a/assets/Scripts/Game/Player/Weapon/Weapon.ts +++ b/assets/Scripts/Game/Unit/Player/Weapon/Weapon.ts @@ -1,6 +1,6 @@ import { Animation, AnimationState, Component, _decorator } from "cc"; -import { GameTimer } from "../../../Services/GameTimer"; -import { WeaponSettings } from "../../Data/GameSettings"; +import { GameTimer } from "../../../../Services/GameTimer"; +import { WeaponSettings } from "../../../Data/GameSettings"; import { UpgradableCollider } from "./UpgradableCollider"; const { ccclass, property } = _decorator; diff --git a/assets/Scripts/Game/Player/Weapon/Weapon.ts.meta b/assets/Scripts/Game/Unit/Player/Weapon/Weapon.ts.meta similarity index 100% rename from assets/Scripts/Game/Player/Weapon/Weapon.ts.meta rename to assets/Scripts/Game/Unit/Player/Weapon/Weapon.ts.meta diff --git a/assets/Scripts/Game/Player/UnitHealth.ts b/assets/Scripts/Game/Unit/UnitHealth.ts similarity index 100% rename from assets/Scripts/Game/Player/UnitHealth.ts rename to assets/Scripts/Game/Unit/UnitHealth.ts diff --git a/assets/Scripts/Game/Player/UnitHealth.ts.meta b/assets/Scripts/Game/Unit/UnitHealth.ts.meta similarity index 100% rename from assets/Scripts/Game/Player/UnitHealth.ts.meta rename to assets/Scripts/Game/Unit/UnitHealth.ts.meta diff --git a/assets/Scripts/Game/Player/UnitLevel.ts b/assets/Scripts/Game/Unit/UnitLevel.ts similarity index 100% rename from assets/Scripts/Game/Player/UnitLevel.ts rename to assets/Scripts/Game/Unit/UnitLevel.ts diff --git a/assets/Scripts/Game/Player/UnitLevel.ts.meta b/assets/Scripts/Game/Unit/UnitLevel.ts.meta similarity index 100% rename from assets/Scripts/Game/Player/UnitLevel.ts.meta rename to assets/Scripts/Game/Unit/UnitLevel.ts.meta