From 1a27f478d025de497a7f0403c5123021dd1441ec Mon Sep 17 00:00:00 2001 From: sli97 <775303361@qq.com> Date: Sun, 27 Nov 2022 23:23:47 +0800 Subject: [PATCH] init --- .gitignore | 160 ++ README.md | 5 + ...tom Script Template Help Documentation.url | 2 + client/.creator/default-meta.json | 5 + client/.eslintrc | 11 + client/.gitignore | 24 + client/assets/Animations.meta | 12 + client/assets/Scenes.meta | 12 + client/assets/Scenes/Batle.scene | 2214 +++++++++++++++++ client/assets/Scenes/Batle.scene.meta | 11 + client/assets/Scripts.meta | 12 + client/assets/Scripts/Base.meta | 12 + client/assets/Scripts/Base/EntityManager.ts | 23 + .../assets/Scripts/Base/EntityManager.ts.meta | 9 + client/assets/Scripts/Base/Singleton.ts | 17 + client/assets/Scripts/Base/Singleton.ts.meta | 9 + client/assets/Scripts/Base/State.ts | 48 + client/assets/Scripts/Base/State.ts.meta | 9 + client/assets/Scripts/Base/StateMachine.ts | 90 + .../assets/Scripts/Base/StateMachine.ts.meta | 9 + client/assets/Scripts/Base/SubStateMachine.ts | 30 + .../Scripts/Base/SubStateMachine.ts.meta | 9 + client/assets/Scripts/Entity.meta | 12 + client/assets/Scripts/Entity/Bullet.meta | 12 + .../Scripts/Entity/Bullet/BulletManager.ts | 85 + .../Entity/Bullet/BulletManager.ts.meta | 9 + .../Entity/Bullet/BulletStateMachine.ts | 45 + .../Entity/Bullet/BulletStateMachine.ts.meta | 9 + client/assets/Scripts/Entity/Explosion.meta | 12 + .../Entity/Explosion/ExplosionManager.ts | 17 + .../Entity/Explosion/ExplosionManager.ts.meta | 9 + .../Entity/Explosion/ExplosionStateMachine.ts | 52 + .../Explosion/ExplosionStateMachine.ts.meta | 9 + client/assets/Scripts/Entity/Player.meta | 12 + .../Scripts/Entity/Player/PlayerManager.ts | 118 + .../Entity/Player/PlayerManager.ts.meta | 9 + .../Entity/Player/PlayerStateMachine.ts | 49 + .../Entity/Player/PlayerStateMachine.ts.meta | 9 + client/assets/Scripts/Entity/Weapon.meta | 12 + .../Scripts/Entity/Weapon/WeaponManager.ts | 73 + .../Entity/Weapon/WeaponManager.ts.meta | 9 + .../Entity/Weapon/WeaponStateMachine.ts | 58 + .../Entity/Weapon/WeaponStateMachine.ts.meta | 9 + client/assets/Scripts/Enum.meta | 12 + client/assets/Scripts/Enum/index.ts | 68 + client/assets/Scripts/Enum/index.ts.meta | 9 + client/assets/Scripts/Global.meta | 12 + client/assets/Scripts/Global/DataManager.ts | 164 ++ .../assets/Scripts/Global/DataManager.ts.meta | 9 + client/assets/Scripts/Global/EventManager.ts | 42 + .../Scripts/Global/EventManager.ts.meta | 9 + .../assets/Scripts/Global/NetworkManager.ts | 44 + .../Scripts/Global/NetworkManager.ts.meta | 9 + .../Scripts/Global/ObjectPoolManager.ts | 52 + .../Scripts/Global/ObjectPoolManager.ts.meta | 9 + .../assets/Scripts/Global/ResourceManager.ts | 32 + .../Scripts/Global/ResourceManager.ts.meta | 9 + client/assets/Scripts/Scene.meta | 12 + client/assets/Scripts/Scene/BattleManager.ts | 156 ++ .../Scripts/Scene/BattleManager.ts.meta | 9 + client/assets/Scripts/UI.meta | 12 + client/assets/Scripts/UI/JoyStickManager.ts | 58 + .../assets/Scripts/UI/JoyStickManager.ts.meta | 9 + client/assets/Scripts/UI/ShootManager.ts | 13 + client/assets/Scripts/UI/ShootManager.ts.meta | 9 + client/assets/Scripts/Utils.meta | 12 + client/assets/Scripts/Utils/index.ts | 20 + client/assets/Scripts/Utils/index.ts.meta | 9 + client/assets/resources.meta | 15 + client/assets/resources/prefab.meta | 12 + client/assets/resources/prefab/Bullet.prefab | 142 ++ .../resources/prefab/Bullet.prefab.meta | 13 + .../assets/resources/prefab/Explosion.prefab | 142 ++ .../resources/prefab/Explosion.prefab.meta | 13 + .../assets/resources/prefab/JoyStick.prefab | 580 +++++ .../resources/prefab/JoyStick.prefab.meta | 13 + client/assets/resources/prefab/Map1.prefab | 180 ++ .../assets/resources/prefab/Map1.prefab.meta | 13 + client/assets/resources/prefab/Player.prefab | 690 +++++ .../resources/prefab/Player.prefab.meta | 13 + client/assets/resources/prefab/Shoot.prefab | 275 ++ .../assets/resources/prefab/Shoot.prefab.meta | 13 + client/assets/resources/prefab/Weapon1.prefab | 400 +++ .../resources/prefab/Weapon1.prefab.meta | 13 + client/assets/resources/prefab/Weapon2.prefab | 400 +++ .../resources/prefab/Weapon2.prefab.meta | 13 + client/assets/resources/texture.meta | 12 + client/assets/resources/texture/bg.meta | 12 + client/assets/resources/texture/bg/tile.png | Bin 0 -> 2164 bytes .../assets/resources/texture/bg/tile.png.meta | 134 + client/assets/resources/texture/bullet.meta | 12 + .../resources/texture/bullet/bullet1.meta | 12 + .../texture/bullet/bullet1/bullet1 (1).png | Bin 0 -> 185 bytes .../bullet/bullet1/bullet1 (1).png.meta | 134 + .../resources/texture/bullet/bullet2.meta | 12 + .../texture/bullet/bullet2/bullet2 (1).png | Bin 0 -> 167 bytes .../bullet/bullet2/bullet2 (1).png.meta | 134 + .../assets/resources/texture/explosion.meta | 12 + .../texture/explosion/explosion (1).png | Bin 0 -> 166 bytes .../texture/explosion/explosion (1).png.meta | 134 + .../texture/explosion/explosion (2).png | Bin 0 -> 154 bytes .../texture/explosion/explosion (2).png.meta | 134 + .../texture/explosion/explosion (3).png | Bin 0 -> 334 bytes .../texture/explosion/explosion (3).png.meta | 134 + .../texture/explosion/explosion (4).png | Bin 0 -> 382 bytes .../texture/explosion/explosion (4).png.meta | 134 + .../texture/explosion/explosion (5).png | Bin 0 -> 343 bytes .../texture/explosion/explosion (5).png.meta | 134 + .../texture/explosion/explosion (6).png | Bin 0 -> 217 bytes .../texture/explosion/explosion (6).png.meta | 134 + .../texture/explosion/explosion (7).png | Bin 0 -> 114 bytes .../texture/explosion/explosion (7).png.meta | 134 + client/assets/resources/texture/joystick.meta | 12 + .../resources/texture/joystick/circle.png | Bin 0 -> 5280 bytes .../texture/joystick/circle.png.meta | 134 + client/assets/resources/texture/player.meta | 12 + .../resources/texture/player/player1.meta | 12 + .../texture/player/player1/idle.meta | 12 + .../texture/player/player1/idle/idle (1).png | Bin 0 -> 325 bytes .../player/player1/idle/idle (1).png.meta | 134 + .../texture/player/player1/idle/idle (2).png | Bin 0 -> 325 bytes .../player/player1/idle/idle (2).png.meta | 134 + .../texture/player/player1/idle/idle (3).png | Bin 0 -> 311 bytes .../player/player1/idle/idle (3).png.meta | 134 + .../texture/player/player1/idle/idle (4).png | Bin 0 -> 311 bytes .../player/player1/idle/idle (4).png.meta | 134 + .../texture/player/player1/idle/idle (5).png | Bin 0 -> 309 bytes .../player/player1/idle/idle (5).png.meta | 134 + .../texture/player/player1/idle/idle (6).png | Bin 0 -> 309 bytes .../player/player1/idle/idle (6).png.meta | 134 + .../resources/texture/player/player1/run.meta | 12 + .../texture/player/player1/run/run (1).png | Bin 0 -> 322 bytes .../player/player1/run/run (1).png.meta | 134 + .../texture/player/player1/run/run (2).png | Bin 0 -> 336 bytes .../player/player1/run/run (2).png.meta | 134 + .../texture/player/player1/run/run (3).png | Bin 0 -> 332 bytes .../player/player1/run/run (3).png.meta | 134 + .../texture/player/player1/run/run (4).png | Bin 0 -> 312 bytes .../player/player1/run/run (4).png.meta | 134 + .../texture/player/player1/run/run (5).png | Bin 0 -> 317 bytes .../player/player1/run/run (5).png.meta | 134 + .../texture/player/player1/run/run (6).png | Bin 0 -> 333 bytes .../player/player1/run/run (6).png.meta | 134 + .../resources/texture/player/player2.meta | 12 + .../texture/player/player2/idle.meta | 12 + .../texture/player/player2/idle/idle (1).png | Bin 0 -> 305 bytes .../player/player2/idle/idle (1).png.meta | 134 + .../texture/player/player2/idle/idle (2).png | Bin 0 -> 305 bytes .../player/player2/idle/idle (2).png.meta | 134 + .../texture/player/player2/idle/idle (3).png | Bin 0 -> 307 bytes .../player/player2/idle/idle (3).png.meta | 134 + .../texture/player/player2/idle/idle (4).png | Bin 0 -> 310 bytes .../player/player2/idle/idle (4).png.meta | 134 + .../texture/player/player2/idle/idle (5).png | Bin 0 -> 323 bytes .../player/player2/idle/idle (5).png.meta | 134 + .../texture/player/player2/idle/idle (6).png | Bin 0 -> 323 bytes .../player/player2/idle/idle (6).png.meta | 134 + .../resources/texture/player/player2/run.meta | 12 + .../texture/player/player2/run/run (1).png | Bin 0 -> 306 bytes .../player/player2/run/run (1).png.meta | 134 + .../texture/player/player2/run/run (2).png | Bin 0 -> 289 bytes .../player/player2/run/run (2).png.meta | 134 + .../texture/player/player2/run/run (3).png | Bin 0 -> 290 bytes .../player/player2/run/run (3).png.meta | 134 + .../texture/player/player2/run/run (4).png | Bin 0 -> 325 bytes .../player/player2/run/run (4).png.meta | 134 + .../texture/player/player2/run/run (5).png | Bin 0 -> 277 bytes .../player/player2/run/run (5).png.meta | 134 + .../texture/player/player2/run/run (6).png | Bin 0 -> 309 bytes .../player/player2/run/run (6).png.meta | 134 + client/assets/resources/texture/weapon.meta | 12 + .../resources/texture/weapon/weapon1.meta | 12 + .../texture/weapon/weapon1/attack.meta | 12 + .../weapon/weapon1/attack/attack (1).png | Bin 0 -> 291 bytes .../weapon/weapon1/attack/attack (1).png.meta | 134 + .../weapon/weapon1/attack/attack (2).png | Bin 0 -> 316 bytes .../weapon/weapon1/attack/attack (2).png.meta | 134 + .../weapon/weapon1/attack/attack (3).png | Bin 0 -> 271 bytes .../weapon/weapon1/attack/attack (3).png.meta | 134 + .../weapon/weapon1/attack/attack (4).png | Bin 0 -> 271 bytes .../weapon/weapon1/attack/attack (4).png.meta | 134 + .../weapon/weapon1/attack/attack (5).png | Bin 0 -> 333 bytes .../weapon/weapon1/attack/attack (5).png.meta | 134 + .../weapon/weapon1/attack/attack (6).png | Bin 0 -> 312 bytes .../weapon/weapon1/attack/attack (6).png.meta | 134 + .../weapon/weapon1/attack/attack (7).png | Bin 0 -> 268 bytes .../weapon/weapon1/attack/attack (7).png.meta | 134 + .../texture/weapon/weapon1/idle.meta | 12 + .../texture/weapon/weapon1/idle/idle (1).png | Bin 0 -> 243 bytes .../weapon/weapon1/idle/idle (1).png.meta | 134 + .../resources/texture/weapon/weapon2.meta | 12 + .../texture/weapon/weapon2/attack.meta | 12 + .../weapon/weapon2/attack/attack (1).png | Bin 0 -> 421 bytes .../weapon/weapon2/attack/attack (1).png.meta | 134 + .../weapon/weapon2/attack/attack (2).png | Bin 0 -> 366 bytes .../weapon/weapon2/attack/attack (2).png.meta | 134 + .../weapon/weapon2/attack/attack (3).png | Bin 0 -> 309 bytes .../weapon/weapon2/attack/attack (3).png.meta | 134 + .../weapon/weapon2/attack/attack (4).png | Bin 0 -> 284 bytes .../weapon/weapon2/attack/attack (4).png.meta | 134 + .../weapon/weapon2/attack/attack (5).png | Bin 0 -> 283 bytes .../weapon/weapon2/attack/attack (5).png.meta | 134 + .../weapon/weapon2/attack/attack (6).png | Bin 0 -> 320 bytes .../weapon/weapon2/attack/attack (6).png.meta | 134 + .../weapon/weapon2/attack/attack (7).png | Bin 0 -> 301 bytes .../weapon/weapon2/attack/attack (7).png.meta | 134 + .../texture/weapon/weapon2/idle.meta | 12 + .../texture/weapon/weapon2/idle/idle (1).png | Bin 0 -> 266 bytes .../weapon/weapon2/idle/idle (1).png.meta | 134 + client/package.json | 15 + .../settings/v2/packages/cocos-service.json | 22 + client/settings/v2/packages/engine.json | 118 + client/settings/v2/packages/project.json | 8 + client/tsconfig.json | 9 + server/package.json | 26 + server/src/binary.ts | 821 ++++++ server/src/eMath.ts | 402 +++ server/src/index.ts | 48 + server/tsconfig.json | 103 + 219 files changed, 15759 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 client/.creator/asset-template/typescript/Custom Script Template Help Documentation.url create mode 100644 client/.creator/default-meta.json create mode 100644 client/.eslintrc create mode 100644 client/.gitignore create mode 100644 client/assets/Animations.meta create mode 100644 client/assets/Scenes.meta create mode 100644 client/assets/Scenes/Batle.scene create mode 100644 client/assets/Scenes/Batle.scene.meta create mode 100644 client/assets/Scripts.meta create mode 100644 client/assets/Scripts/Base.meta create mode 100644 client/assets/Scripts/Base/EntityManager.ts create mode 100644 client/assets/Scripts/Base/EntityManager.ts.meta create mode 100644 client/assets/Scripts/Base/Singleton.ts create mode 100644 client/assets/Scripts/Base/Singleton.ts.meta create mode 100644 client/assets/Scripts/Base/State.ts create mode 100644 client/assets/Scripts/Base/State.ts.meta create mode 100644 client/assets/Scripts/Base/StateMachine.ts create mode 100644 client/assets/Scripts/Base/StateMachine.ts.meta create mode 100644 client/assets/Scripts/Base/SubStateMachine.ts create mode 100644 client/assets/Scripts/Base/SubStateMachine.ts.meta create mode 100644 client/assets/Scripts/Entity.meta create mode 100644 client/assets/Scripts/Entity/Bullet.meta create mode 100644 client/assets/Scripts/Entity/Bullet/BulletManager.ts create mode 100644 client/assets/Scripts/Entity/Bullet/BulletManager.ts.meta create mode 100644 client/assets/Scripts/Entity/Bullet/BulletStateMachine.ts create mode 100644 client/assets/Scripts/Entity/Bullet/BulletStateMachine.ts.meta create mode 100644 client/assets/Scripts/Entity/Explosion.meta create mode 100644 client/assets/Scripts/Entity/Explosion/ExplosionManager.ts create mode 100644 client/assets/Scripts/Entity/Explosion/ExplosionManager.ts.meta create mode 100644 client/assets/Scripts/Entity/Explosion/ExplosionStateMachine.ts create mode 100644 client/assets/Scripts/Entity/Explosion/ExplosionStateMachine.ts.meta create mode 100644 client/assets/Scripts/Entity/Player.meta create mode 100644 client/assets/Scripts/Entity/Player/PlayerManager.ts create mode 100644 client/assets/Scripts/Entity/Player/PlayerManager.ts.meta create mode 100644 client/assets/Scripts/Entity/Player/PlayerStateMachine.ts create mode 100644 client/assets/Scripts/Entity/Player/PlayerStateMachine.ts.meta create mode 100644 client/assets/Scripts/Entity/Weapon.meta create mode 100644 client/assets/Scripts/Entity/Weapon/WeaponManager.ts create mode 100644 client/assets/Scripts/Entity/Weapon/WeaponManager.ts.meta create mode 100644 client/assets/Scripts/Entity/Weapon/WeaponStateMachine.ts create mode 100644 client/assets/Scripts/Entity/Weapon/WeaponStateMachine.ts.meta create mode 100644 client/assets/Scripts/Enum.meta create mode 100644 client/assets/Scripts/Enum/index.ts create mode 100644 client/assets/Scripts/Enum/index.ts.meta create mode 100644 client/assets/Scripts/Global.meta create mode 100644 client/assets/Scripts/Global/DataManager.ts create mode 100644 client/assets/Scripts/Global/DataManager.ts.meta create mode 100644 client/assets/Scripts/Global/EventManager.ts create mode 100644 client/assets/Scripts/Global/EventManager.ts.meta create mode 100644 client/assets/Scripts/Global/NetworkManager.ts create mode 100644 client/assets/Scripts/Global/NetworkManager.ts.meta create mode 100644 client/assets/Scripts/Global/ObjectPoolManager.ts create mode 100644 client/assets/Scripts/Global/ObjectPoolManager.ts.meta create mode 100644 client/assets/Scripts/Global/ResourceManager.ts create mode 100644 client/assets/Scripts/Global/ResourceManager.ts.meta create mode 100644 client/assets/Scripts/Scene.meta create mode 100644 client/assets/Scripts/Scene/BattleManager.ts create mode 100644 client/assets/Scripts/Scene/BattleManager.ts.meta create mode 100644 client/assets/Scripts/UI.meta create mode 100644 client/assets/Scripts/UI/JoyStickManager.ts create mode 100644 client/assets/Scripts/UI/JoyStickManager.ts.meta create mode 100644 client/assets/Scripts/UI/ShootManager.ts create mode 100644 client/assets/Scripts/UI/ShootManager.ts.meta create mode 100644 client/assets/Scripts/Utils.meta create mode 100644 client/assets/Scripts/Utils/index.ts create mode 100644 client/assets/Scripts/Utils/index.ts.meta create mode 100644 client/assets/resources.meta create mode 100644 client/assets/resources/prefab.meta create mode 100644 client/assets/resources/prefab/Bullet.prefab create mode 100644 client/assets/resources/prefab/Bullet.prefab.meta create mode 100644 client/assets/resources/prefab/Explosion.prefab create mode 100644 client/assets/resources/prefab/Explosion.prefab.meta create mode 100644 client/assets/resources/prefab/JoyStick.prefab create mode 100644 client/assets/resources/prefab/JoyStick.prefab.meta create mode 100644 client/assets/resources/prefab/Map1.prefab create mode 100644 client/assets/resources/prefab/Map1.prefab.meta create mode 100644 client/assets/resources/prefab/Player.prefab create mode 100644 client/assets/resources/prefab/Player.prefab.meta create mode 100644 client/assets/resources/prefab/Shoot.prefab create mode 100644 client/assets/resources/prefab/Shoot.prefab.meta create mode 100644 client/assets/resources/prefab/Weapon1.prefab create mode 100644 client/assets/resources/prefab/Weapon1.prefab.meta create mode 100644 client/assets/resources/prefab/Weapon2.prefab create mode 100644 client/assets/resources/prefab/Weapon2.prefab.meta create mode 100644 client/assets/resources/texture.meta create mode 100644 client/assets/resources/texture/bg.meta create mode 100644 client/assets/resources/texture/bg/tile.png create mode 100644 client/assets/resources/texture/bg/tile.png.meta create mode 100644 client/assets/resources/texture/bullet.meta create mode 100644 client/assets/resources/texture/bullet/bullet1.meta create mode 100644 client/assets/resources/texture/bullet/bullet1/bullet1 (1).png create mode 100644 client/assets/resources/texture/bullet/bullet1/bullet1 (1).png.meta create mode 100644 client/assets/resources/texture/bullet/bullet2.meta create mode 100644 client/assets/resources/texture/bullet/bullet2/bullet2 (1).png create mode 100644 client/assets/resources/texture/bullet/bullet2/bullet2 (1).png.meta create mode 100644 client/assets/resources/texture/explosion.meta create mode 100644 client/assets/resources/texture/explosion/explosion (1).png create mode 100644 client/assets/resources/texture/explosion/explosion (1).png.meta create mode 100644 client/assets/resources/texture/explosion/explosion (2).png create mode 100644 client/assets/resources/texture/explosion/explosion (2).png.meta create mode 100644 client/assets/resources/texture/explosion/explosion (3).png create mode 100644 client/assets/resources/texture/explosion/explosion (3).png.meta create mode 100644 client/assets/resources/texture/explosion/explosion (4).png create mode 100644 client/assets/resources/texture/explosion/explosion (4).png.meta create mode 100644 client/assets/resources/texture/explosion/explosion (5).png create mode 100644 client/assets/resources/texture/explosion/explosion (5).png.meta create mode 100644 client/assets/resources/texture/explosion/explosion (6).png create mode 100644 client/assets/resources/texture/explosion/explosion (6).png.meta create mode 100644 client/assets/resources/texture/explosion/explosion (7).png create mode 100644 client/assets/resources/texture/explosion/explosion (7).png.meta create mode 100644 client/assets/resources/texture/joystick.meta create mode 100644 client/assets/resources/texture/joystick/circle.png create mode 100644 client/assets/resources/texture/joystick/circle.png.meta create mode 100644 client/assets/resources/texture/player.meta create mode 100644 client/assets/resources/texture/player/player1.meta create mode 100644 client/assets/resources/texture/player/player1/idle.meta create mode 100644 client/assets/resources/texture/player/player1/idle/idle (1).png create mode 100644 client/assets/resources/texture/player/player1/idle/idle (1).png.meta create mode 100644 client/assets/resources/texture/player/player1/idle/idle (2).png create mode 100644 client/assets/resources/texture/player/player1/idle/idle (2).png.meta create mode 100644 client/assets/resources/texture/player/player1/idle/idle (3).png create mode 100644 client/assets/resources/texture/player/player1/idle/idle (3).png.meta create mode 100644 client/assets/resources/texture/player/player1/idle/idle (4).png create mode 100644 client/assets/resources/texture/player/player1/idle/idle (4).png.meta create mode 100644 client/assets/resources/texture/player/player1/idle/idle (5).png create mode 100644 client/assets/resources/texture/player/player1/idle/idle (5).png.meta create mode 100644 client/assets/resources/texture/player/player1/idle/idle (6).png create mode 100644 client/assets/resources/texture/player/player1/idle/idle (6).png.meta create mode 100644 client/assets/resources/texture/player/player1/run.meta create mode 100644 client/assets/resources/texture/player/player1/run/run (1).png create mode 100644 client/assets/resources/texture/player/player1/run/run (1).png.meta create mode 100644 client/assets/resources/texture/player/player1/run/run (2).png create mode 100644 client/assets/resources/texture/player/player1/run/run (2).png.meta create mode 100644 client/assets/resources/texture/player/player1/run/run (3).png create mode 100644 client/assets/resources/texture/player/player1/run/run (3).png.meta create mode 100644 client/assets/resources/texture/player/player1/run/run (4).png create mode 100644 client/assets/resources/texture/player/player1/run/run (4).png.meta create mode 100644 client/assets/resources/texture/player/player1/run/run (5).png create mode 100644 client/assets/resources/texture/player/player1/run/run (5).png.meta create mode 100644 client/assets/resources/texture/player/player1/run/run (6).png create mode 100644 client/assets/resources/texture/player/player1/run/run (6).png.meta create mode 100644 client/assets/resources/texture/player/player2.meta create mode 100644 client/assets/resources/texture/player/player2/idle.meta create mode 100644 client/assets/resources/texture/player/player2/idle/idle (1).png create mode 100644 client/assets/resources/texture/player/player2/idle/idle (1).png.meta create mode 100644 client/assets/resources/texture/player/player2/idle/idle (2).png create mode 100644 client/assets/resources/texture/player/player2/idle/idle (2).png.meta create mode 100644 client/assets/resources/texture/player/player2/idle/idle (3).png create mode 100644 client/assets/resources/texture/player/player2/idle/idle (3).png.meta create mode 100644 client/assets/resources/texture/player/player2/idle/idle (4).png create mode 100644 client/assets/resources/texture/player/player2/idle/idle (4).png.meta create mode 100644 client/assets/resources/texture/player/player2/idle/idle (5).png create mode 100644 client/assets/resources/texture/player/player2/idle/idle (5).png.meta create mode 100644 client/assets/resources/texture/player/player2/idle/idle (6).png create mode 100644 client/assets/resources/texture/player/player2/idle/idle (6).png.meta create mode 100644 client/assets/resources/texture/player/player2/run.meta create mode 100644 client/assets/resources/texture/player/player2/run/run (1).png create mode 100644 client/assets/resources/texture/player/player2/run/run (1).png.meta create mode 100644 client/assets/resources/texture/player/player2/run/run (2).png create mode 100644 client/assets/resources/texture/player/player2/run/run (2).png.meta create mode 100644 client/assets/resources/texture/player/player2/run/run (3).png create mode 100644 client/assets/resources/texture/player/player2/run/run (3).png.meta create mode 100644 client/assets/resources/texture/player/player2/run/run (4).png create mode 100644 client/assets/resources/texture/player/player2/run/run (4).png.meta create mode 100644 client/assets/resources/texture/player/player2/run/run (5).png create mode 100644 client/assets/resources/texture/player/player2/run/run (5).png.meta create mode 100644 client/assets/resources/texture/player/player2/run/run (6).png create mode 100644 client/assets/resources/texture/player/player2/run/run (6).png.meta create mode 100644 client/assets/resources/texture/weapon.meta create mode 100644 client/assets/resources/texture/weapon/weapon1.meta create mode 100644 client/assets/resources/texture/weapon/weapon1/attack.meta create mode 100644 client/assets/resources/texture/weapon/weapon1/attack/attack (1).png create mode 100644 client/assets/resources/texture/weapon/weapon1/attack/attack (1).png.meta create mode 100644 client/assets/resources/texture/weapon/weapon1/attack/attack (2).png create mode 100644 client/assets/resources/texture/weapon/weapon1/attack/attack (2).png.meta create mode 100644 client/assets/resources/texture/weapon/weapon1/attack/attack (3).png create mode 100644 client/assets/resources/texture/weapon/weapon1/attack/attack (3).png.meta create mode 100644 client/assets/resources/texture/weapon/weapon1/attack/attack (4).png create mode 100644 client/assets/resources/texture/weapon/weapon1/attack/attack (4).png.meta create mode 100644 client/assets/resources/texture/weapon/weapon1/attack/attack (5).png create mode 100644 client/assets/resources/texture/weapon/weapon1/attack/attack (5).png.meta create mode 100644 client/assets/resources/texture/weapon/weapon1/attack/attack (6).png create mode 100644 client/assets/resources/texture/weapon/weapon1/attack/attack (6).png.meta create mode 100644 client/assets/resources/texture/weapon/weapon1/attack/attack (7).png create mode 100644 client/assets/resources/texture/weapon/weapon1/attack/attack (7).png.meta create mode 100644 client/assets/resources/texture/weapon/weapon1/idle.meta create mode 100644 client/assets/resources/texture/weapon/weapon1/idle/idle (1).png create mode 100644 client/assets/resources/texture/weapon/weapon1/idle/idle (1).png.meta create mode 100644 client/assets/resources/texture/weapon/weapon2.meta create mode 100644 client/assets/resources/texture/weapon/weapon2/attack.meta create mode 100644 client/assets/resources/texture/weapon/weapon2/attack/attack (1).png create mode 100644 client/assets/resources/texture/weapon/weapon2/attack/attack (1).png.meta create mode 100644 client/assets/resources/texture/weapon/weapon2/attack/attack (2).png create mode 100644 client/assets/resources/texture/weapon/weapon2/attack/attack (2).png.meta create mode 100644 client/assets/resources/texture/weapon/weapon2/attack/attack (3).png create mode 100644 client/assets/resources/texture/weapon/weapon2/attack/attack (3).png.meta create mode 100644 client/assets/resources/texture/weapon/weapon2/attack/attack (4).png create mode 100644 client/assets/resources/texture/weapon/weapon2/attack/attack (4).png.meta create mode 100644 client/assets/resources/texture/weapon/weapon2/attack/attack (5).png create mode 100644 client/assets/resources/texture/weapon/weapon2/attack/attack (5).png.meta create mode 100644 client/assets/resources/texture/weapon/weapon2/attack/attack (6).png create mode 100644 client/assets/resources/texture/weapon/weapon2/attack/attack (6).png.meta create mode 100644 client/assets/resources/texture/weapon/weapon2/attack/attack (7).png create mode 100644 client/assets/resources/texture/weapon/weapon2/attack/attack (7).png.meta create mode 100644 client/assets/resources/texture/weapon/weapon2/idle.meta create mode 100644 client/assets/resources/texture/weapon/weapon2/idle/idle (1).png create mode 100644 client/assets/resources/texture/weapon/weapon2/idle/idle (1).png.meta create mode 100644 client/package.json create mode 100644 client/settings/v2/packages/cocos-service.json create mode 100644 client/settings/v2/packages/engine.json create mode 100644 client/settings/v2/packages/project.json create mode 100644 client/tsconfig.json create mode 100644 server/package.json create mode 100644 server/src/binary.ts create mode 100644 server/src/eMath.ts create mode 100644 server/src/index.ts create mode 100644 server/tsconfig.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..362d2e8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,160 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# Next.js build output +.next + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and *not* Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +.DS_Store + +package-lock.json + +#///////////////////////////////////////////////////////////////////////////// +# Fireball Projects +#///////////////////////////////////////////////////////////////////////////// + +/library/ +/temp/ +/local/ +/build/ + +#///////////////////////////////////////////////////////////////////////////// +# npm files +#///////////////////////////////////////////////////////////////////////////// + +npm-debug.log +node_modules/ + +#///////////////////////////////////////////////////////////////////////////// +# Logs and databases +#///////////////////////////////////////////////////////////////////////////// + +*.log +*.sql +*.sqlite + +#///////////////////////////////////////////////////////////////////////////// +# files for debugger +#///////////////////////////////////////////////////////////////////////////// + +*.sln +*.pidb +*.suo + +#///////////////////////////////////////////////////////////////////////////// +# OS generated files +#///////////////////////////////////////////////////////////////////////////// + +.DS_Store +ehthumbs.db +Thumbs.db + +#///////////////////////////////////////////////////////////////////////////// +# WebStorm files +#///////////////////////////////////////////////////////////////////////////// + +.idea/ + +#////////////////////////// +# VS Code files +#////////////////////////// + +.vscode/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..9284c26 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# 实时对战 +# IO +# 帧同步 +# Cocos Creator +# Node.js \ No newline at end of file diff --git a/client/.creator/asset-template/typescript/Custom Script Template Help Documentation.url b/client/.creator/asset-template/typescript/Custom Script Template Help Documentation.url new file mode 100644 index 0000000..7606df0 --- /dev/null +++ b/client/.creator/asset-template/typescript/Custom Script Template Help Documentation.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://docs.cocos.com/creator/manual/en/scripting/setup.html#custom-script-template \ No newline at end of file diff --git a/client/.creator/default-meta.json b/client/.creator/default-meta.json new file mode 100644 index 0000000..abb1239 --- /dev/null +++ b/client/.creator/default-meta.json @@ -0,0 +1,5 @@ +{ + "image": { + "type": "sprite-frame" + } +} diff --git a/client/.eslintrc b/client/.eslintrc new file mode 100644 index 0000000..e0a4c31 --- /dev/null +++ b/client/.eslintrc @@ -0,0 +1,11 @@ +{ + "extends": "@antfu", + "rules": { + "curly": "off", + "no-console": "off", + "no-cond-assign": "off", + "no-useless-call": "off", + "@typescript-eslint/brace-style": "off", + "@typescript-eslint/consistent-type-imports": "off" + } +} \ No newline at end of file diff --git a/client/.gitignore b/client/.gitignore new file mode 100644 index 0000000..3fb6012 --- /dev/null +++ b/client/.gitignore @@ -0,0 +1,24 @@ + +#/////////////////////////// +# Cocos Creator 3D Project +#/////////////////////////// +library/ +temp/ +local/ +build/ +profiles/ +native +#////////////////////////// +# NPM +#////////////////////////// +node_modules/ + +#////////////////////////// +# VSCode +#////////////////////////// +# .vscode/ + +#////////////////////////// +# WebStorm +#////////////////////////// +.idea/ \ No newline at end of file diff --git a/client/assets/Animations.meta b/client/assets/Animations.meta new file mode 100644 index 0000000..f523938 --- /dev/null +++ b/client/assets/Animations.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "2d541e68-a3ab-45a5-a30d-ffc21e6aa37f", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scenes.meta b/client/assets/Scenes.meta new file mode 100644 index 0000000..f910e3e --- /dev/null +++ b/client/assets/Scenes.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "e4b93ee1-f734-42e9-8468-c45a928b7b58", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scenes/Batle.scene b/client/assets/Scenes/Batle.scene new file mode 100644 index 0000000..206316b --- /dev/null +++ b/client/assets/Scenes/Batle.scene @@ -0,0 +1,2214 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "", + "_objFlags": 0, + "_native": "", + "scene": { + "__id__": 1 + } + }, + { + "__type__": "cc.Scene", + "_name": "Batle", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 62 + }, + "autoReleaseAssets": false, + "_globals": { + "__id__": 63 + }, + "_id": "c6ff3dfa-c3a9-4c47-abc2-690531911090" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 5 + }, + { + "__id__": 35 + } + ], + "_active": true, + "_components": [ + { + "__id__": 58 + }, + { + "__id__": 59 + }, + { + "__id__": 60 + }, + { + "__id__": 61 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 480.00000000000006, + "y": 320, + "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": "beI88Z2HpFELqR4T5EMHpg" + }, + { + "__type__": "cc.Node", + "_name": "Camera", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 1000 + }, + "_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": "ebFwiq8gBFaYpqYbdoDODe" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": null, + "_projection": 0, + "_priority": 1073741824, + "_fov": 45, + "_fovAxis": 0, + "_orthoHeight": 320, + "_near": 0, + "_far": 2000, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": 1, + "_stencil": 0, + "_clearFlags": 7, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_aperture": 19, + "_shutter": 7, + "_iso": 0, + "_screenScale": 1, + "_visibility": 41943040, + "_targetTexture": null, + "_id": "63WIch3o5BEYRlXzTT0oWc" + }, + { + "__type__": "cc.Node", + "_name": "Stage", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 6 + }, + { + "__id__": 10 + } + ], + "_active": true, + "_components": [ + { + "__id__": 33 + }, + { + "__id__": 34 + } + ], + "_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": "4f+jPWeFhNc4ZCA6gQJjOM" + }, + { + "__type__": "cc.Node", + "_name": "Map", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 7 + }, + { + "__id__": 8 + }, + { + "__id__": 9 + } + ], + "_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": "6e6eG+5W9FZLM1PayqTYFl" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "82kSgoYHRBA7gbWlLce5ZX" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "155ebd7e-9357-4155-acfc-fb5438af3d48@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 2, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "fdv58HjL5ByJt2WmRvLEEm" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "__prefab": null, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 1000, + "_originalHeight": 1000, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "c3luvolqVEm67OP00sYOAo" + }, + { + "__type__": "cc.Node", + "_name": "Player", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 11 + }, + { + "__id__": 18 + }, + { + "__id__": 28 + } + ], + "_active": true, + "_components": [ + { + "__id__": 30 + }, + { + "__id__": 31 + }, + { + "__id__": 32 + } + ], + "_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": "3eWigPOMpN8KYLJnYZ+s+k" + }, + { + "__type__": "cc.Node", + "_name": "Weapon", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 10 + }, + "_children": [ + { + "__id__": 12 + } + ], + "_active": false, + "_components": [ + { + "__id__": 17 + } + ], + "_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": "4acUt26XNNrIoenPn917EQ" + }, + { + "__type__": "cc.Node", + "_name": "Body", + "_objFlags": 0, + "_parent": { + "__id__": 11 + }, + "_children": [ + { + "__id__": 13 + } + ], + "_active": true, + "_components": [ + { + "__id__": 15 + }, + { + "__id__": 16 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 40, + "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": "3chGu54kdCiryCGOn9MNk1" + }, + { + "__type__": "cc.Node", + "_name": "BulletPoint", + "_objFlags": 0, + "_parent": { + "__id__": 12 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 14 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 55.11, + "y": 5, + "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": "7fo88SUhZF/qLavMZSyMrA" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 13 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "04DzjI94xMiLSVYxmPLqKc" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 12 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 150, + "height": 150 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "0f1osiWUpAJYLTMppMb3lm" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 12 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "f815a77d-5654-4a6a-86ef-be8f1efaa95e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_useGrayscale": false, + "_atlas": null, + "_id": "0a0fBlOAdARql4Yi+gYYei" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "f88//t3OVM0bUTvqxiCwTF" + }, + { + "__type__": "cc.Node", + "_name": "Weapon2", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 10 + }, + "_children": [ + { + "__id__": 19 + } + ], + "_active": true, + "_components": [ + { + "__id__": 27 + } + ], + "_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": "8aVXWZ+MpH/Yz560HNrpTf" + }, + { + "__type__": "cc.Node", + "_name": "Body", + "_objFlags": 0, + "_parent": { + "__id__": 18 + }, + "_children": [ + { + "__id__": 20 + } + ], + "_active": true, + "_components": [ + { + "__id__": 25 + }, + { + "__id__": 26 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 50, + "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": "18iRoolShDLrG3xcHinuOK" + }, + { + "__type__": "cc.Node", + "_name": "BulletPoint", + "_objFlags": 0, + "_parent": { + "__id__": 19 + }, + "_children": [ + { + "__id__": 21 + } + ], + "_active": true, + "_components": [ + { + "__id__": 24 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 70, + "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": "0avhwJaSRMBpgQLnPoCjlw" + }, + { + "__type__": "cc.Node", + "_name": "Bullet1", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 20 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 22 + }, + { + "__id__": 23 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": -4.889999999999986, + "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": "f9G0I2mVFD8ZclECxVPz/p" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "2aQAM5mP9DSZxFSlga2yO5" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "23c36f17-b533-41fc-ada4-4c3408ec5597@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "97tJNL0sxPuYwNaY5Ihrac" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "d85f+mrI9MQpkt6AOemueG" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 19 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 150, + "height": 150 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "14ANzS4gRMMo3ZiAV00Flj" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 19 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "d6c248fd-c31d-475f-948a-be099aca55d3@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_useGrayscale": false, + "_atlas": null, + "_id": "c6KUs0DCBEdY63tdUh4m0f" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 18 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "c4GdDuvE5HE4GdAEVHtDrM" + }, + { + "__type__": "cc.Node", + "_name": "Node", + "_objFlags": 0, + "_parent": { + "__id__": 10 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 29 + } + ], + "_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": "7ftqoPPUdO+pVMIpEzXwsX" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 28 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 70, + "height": 70 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "b9kTLaK3xC7rD1roBVJGLP" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "6bcfOJGTREvo8F5RiCwmua" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "f0f5e564-2d98-4de1-bb92-794eeb1acffc@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "01s6izKf5CH4OyC7K0Ayc3" + }, + { + "__type__": "cc.RigidBody2D", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "__prefab": null, + "enabledContactListener": false, + "bullet": false, + "awakeOnLoad": true, + "_group": 1, + "_type": 1, + "_allowSleep": true, + "_gravityScale": 1, + "_linearDamping": 0, + "_angularDamping": 0, + "_linearVelocity": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_angularVelocity": 0, + "_fixedRotation": true, + "_id": "bbIfC0Mn9AcZxmQDRKIfwE" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "84q/T/oEZLxZ52jxDB5Nea" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "__prefab": null, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 100, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "acvU7K+3tASIxzNR1znXTr" + }, + { + "__type__": "cc.Node", + "_name": "UI", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 36 + }, + { + "__id__": 50 + } + ], + "_active": true, + "_components": [ + { + "__id__": 56 + }, + { + "__id__": 57 + } + ], + "_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": "14eV9+ichBfb0LyCZk8y+k" + }, + { + "__type__": "cc.Node", + "_name": "JoyStick", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 35 + }, + "_children": [ + { + "__id__": 37 + } + ], + "_active": true, + "_components": [ + { + "__id__": 47 + }, + { + "__id__": 48 + }, + { + "__id__": 49 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": -480, + "y": -320, + "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": "d0Km2BWD5NF7BGVqabNjGL" + }, + { + "__type__": "cc.Node", + "_name": "Body", + "_objFlags": 0, + "_parent": { + "__id__": 36 + }, + "_children": [ + { + "__id__": 38 + }, + { + "__id__": 42 + } + ], + "_active": true, + "_components": [ + { + "__id__": 45 + }, + { + "__id__": 46 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 150, + "y": 150, + "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": "5ePE1IffNNEIHGIq8+onPl" + }, + { + "__type__": "cc.Node", + "_name": "Base", + "_objFlags": 0, + "_parent": { + "__id__": 37 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 39 + }, + { + "__id__": 40 + }, + { + "__id__": 41 + } + ], + "_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": "ecWC23pUZEwZYS+ALUi9f3" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 38 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 200 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "c2Te1tDzREy6zf7vhgxqmx" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 38 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 100 + }, + "_spriteFrame": { + "__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "0bhaevCENLfrMOFHPWQXyR" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 38 + }, + "_enabled": true, + "__prefab": null, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 256, + "_originalHeight": 256, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "41VrempLhHG5QVxuuJZ28W" + }, + { + "__type__": "cc.Node", + "_name": "Stick", + "_objFlags": 0, + "_parent": { + "__id__": 37 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 43 + }, + { + "__id__": 44 + } + ], + "_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": 0.3, + "y": 0.3, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "e7hbpmSqBEaY1A28Hpjc4G" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 42 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 256, + "height": 256 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "fcJkQUSNdMl4HT7DqpBwEz" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 42 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "1ck38AkLhAMq0Fbr8rL01H" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 37 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 200 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "0cwEKsJ/RJ97DxVaBjLDr8" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 37 + }, + "_enabled": true, + "__prefab": null, + "_alignFlags": 12, + "_target": null, + "_left": 50, + "_right": 0, + "_top": 0, + "_bottom": 50, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "99Ie4JbrZOf7JF9TQqOtab" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 36 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_id": "8cFV1KKjZI5o68BpkJDf7H" + }, + { + "__type__": "bfc9abjfs9EIq9cZwv/Tsko", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 36 + }, + "_enabled": true, + "__prefab": null, + "_id": "45lhKkgBtP86AoioWUIFyB" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 36 + }, + "_enabled": true, + "__prefab": null, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 960, + "_originalHeight": 640, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "70Jbhs5wBGl7Wi14Ocx+tL" + }, + { + "__type__": "cc.Node", + "_name": "Fire", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 35 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 51 + }, + { + "__id__": 52 + }, + { + "__id__": 53 + }, + { + "__id__": 54 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 330, + "y": -170, + "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": "32Z8x82bFLU6PIr+gkUn17" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 50 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 200 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "19/8SIXxRB3I5AxNeSdVT8" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 50 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 100 + }, + "_spriteFrame": { + "__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "d6/njd4FZHv4j30KRMObzx" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 50 + }, + "_enabled": true, + "__prefab": null, + "_alignFlags": 36, + "_target": null, + "_left": 0, + "_right": 50, + "_top": 0, + "_bottom": 50, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "9bS7inbQFJbZNKl6BzDVrI" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 50 + }, + "_enabled": true, + "__prefab": null, + "clickEvents": [ + { + "__id__": 55 + } + ], + "_interactable": true, + "_transition": 3, + "_normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": { + "__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_hoverSprite": null, + "_pressedSprite": null, + "_disabledSprite": null, + "_duration": 0.1, + "_zoomScale": 0.9, + "_target": null, + "_id": "7fXcpjJjhP0oWUAOX/WgeL" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 50 + }, + "component": "", + "_componentId": "407c9ThQI1IiKmZWhM7VQ4l", + "handler": "fire", + "customEventData": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 35 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "bbpZpj0UBHH5vf6VzRHY/m" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 35 + }, + "_enabled": true, + "__prefab": null, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 100, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "88qaZ4KIlJWo+1BSIXMklG" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "d6rUX5yfhMlKoWX2bSbawx" + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": null, + "_cameraComponent": { + "__id__": 4 + }, + "_alignCanvasWithScreen": true, + "_id": "12O/ljcVlEqLmVm3U2gEOQ" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": null, + "_alignFlags": 45, + "_target": null, + "_left": 5.684341886080802e-14, + "_right": 5.684341886080802e-14, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "c5V1EV8IpMtrIvY1OE9t2u" + }, + { + "__type__": "d8c46Qk5qtNIq8HKTzpjYtb", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": null, + "_id": "dfD/HdXx1HYapAjrwsefWt" + }, + { + "__type__": "cc.PrefabInfo", + "fileId": "c6ff3dfa-c3a9-4c47-abc2-690531911090" + }, + { + "__type__": "cc.SceneGlobals", + "ambient": { + "__id__": 64 + }, + "shadows": { + "__id__": 65 + }, + "_skybox": { + "__id__": 66 + }, + "fog": { + "__id__": 67 + }, + "octree": { + "__id__": 68 + } + }, + { + "__type__": "cc.AmbientInfo", + "_skyColorHDR": { + "__type__": "cc.Vec4", + "x": 0, + "y": 0, + "z": 0, + "w": 0.520833125 + }, + "_skyColor": { + "__type__": "cc.Vec4", + "x": 0, + "y": 0, + "z": 0, + "w": 0.520833125 + }, + "_skyIllumHDR": 20000, + "_skyIllum": 20000, + "_groundAlbedoHDR": { + "__type__": "cc.Vec4", + "x": 0, + "y": 0, + "z": 0, + "w": 0 + }, + "_groundAlbedo": { + "__type__": "cc.Vec4", + "x": 0, + "y": 0, + "z": 0, + "w": 0 + }, + "_skyColorLDR": { + "__type__": "cc.Vec4", + "x": 0.2, + "y": 0.5, + "z": 0.8, + "w": 1 + }, + "_skyIllumLDR": 20000, + "_groundAlbedoLDR": { + "__type__": "cc.Vec4", + "x": 0.2, + "y": 0.2, + "z": 0.2, + "w": 1 + } + }, + { + "__type__": "cc.ShadowsInfo", + "_enabled": false, + "_type": 0, + "_normal": { + "__type__": "cc.Vec3", + "x": 0, + "y": 1, + "z": 0 + }, + "_distance": 0, + "_shadowColor": { + "__type__": "cc.Color", + "r": 76, + "g": 76, + "b": 76, + "a": 255 + }, + "_maxReceived": 4, + "_size": { + "__type__": "cc.Vec2", + "x": 512, + "y": 512 + } + }, + { + "__type__": "cc.SkyboxInfo", + "_envLightingType": 0, + "_envmapHDR": null, + "_envmap": null, + "_envmapLDR": null, + "_diffuseMapHDR": null, + "_diffuseMapLDR": null, + "_enabled": false, + "_useHDR": true, + "_editableMaterial": null, + "_reflectionHDR": null, + "_reflectionLDR": null + }, + { + "__type__": "cc.FogInfo", + "_type": 0, + "_fogColor": { + "__type__": "cc.Color", + "r": 200, + "g": 200, + "b": 200, + "a": 255 + }, + "_enabled": false, + "_fogDensity": 0.3, + "_fogStart": 0.5, + "_fogEnd": 300, + "_fogAtten": 5, + "_fogTop": 1.5, + "_fogRange": 1.2, + "_accurate": false + }, + { + "__type__": "cc.OctreeInfo", + "_enabled": false, + "_minPos": { + "__type__": "cc.Vec3", + "x": -1024, + "y": -1024, + "z": -1024 + }, + "_maxPos": { + "__type__": "cc.Vec3", + "x": 1024, + "y": 1024, + "z": 1024 + }, + "_depth": 8 + } +] \ No newline at end of file diff --git a/client/assets/Scenes/Batle.scene.meta b/client/assets/Scenes/Batle.scene.meta new file mode 100644 index 0000000..9bee8a4 --- /dev/null +++ b/client/assets/Scenes/Batle.scene.meta @@ -0,0 +1,11 @@ +{ + "ver": "1.1.39", + "importer": "scene", + "imported": true, + "uuid": "c6ff3dfa-c3a9-4c47-abc2-690531911090", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts.meta b/client/assets/Scripts.meta new file mode 100644 index 0000000..1fcf96b --- /dev/null +++ b/client/assets/Scripts.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "a5ff1131-2769-49ad-92d3-4d7f4b7c2b24", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Base.meta b/client/assets/Scripts/Base.meta new file mode 100644 index 0000000..fa60401 --- /dev/null +++ b/client/assets/Scripts/Base.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "b9842cc1-d805-42af-b6b9-b15d5dd32f65", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Base/EntityManager.ts b/client/assets/Scripts/Base/EntityManager.ts new file mode 100644 index 0000000..1e58033 --- /dev/null +++ b/client/assets/Scripts/Base/EntityManager.ts @@ -0,0 +1,23 @@ +import { _decorator, Component, Node, Layers, UITransform, Sprite, KeyCode, Vec2, RigidBody2D, BoxCollider2D, Size, ERigidBody2DType } from 'cc'; +import { EntityEnum, EntityStateEnum } from '../Enum'; +import StateMachine from './StateMachine'; +const { ccclass, property } = _decorator; + +@ccclass('EntityManager') +export abstract class EntityManager extends Component { + fsm: StateMachine + private _state: EntityStateEnum + + + get state() { + return this._state + } + + set state(newState) { + this._state = newState + this.fsm.setParams(newState, true) + } + + abstract init(...args: any[]): void +} + diff --git a/client/assets/Scripts/Base/EntityManager.ts.meta b/client/assets/Scripts/Base/EntityManager.ts.meta new file mode 100644 index 0000000..8ed593d --- /dev/null +++ b/client/assets/Scripts/Base/EntityManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "2e4eed53-d1b9-42ef-97aa-8d0a8da927f7", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Base/Singleton.ts b/client/assets/Scripts/Base/Singleton.ts new file mode 100644 index 0000000..afad114 --- /dev/null +++ b/client/assets/Scripts/Base/Singleton.ts @@ -0,0 +1,17 @@ +/*** + * 泛型单例模式接口 + */ + +export default class Singleton { + private static _instance: any = null + + static GetInstance(): T { + if (this._instance === null) { + this._instance = new this() + } + return this._instance + } + + protected constructor() { + } +} diff --git a/client/assets/Scripts/Base/Singleton.ts.meta b/client/assets/Scripts/Base/Singleton.ts.meta new file mode 100644 index 0000000..001b808 --- /dev/null +++ b/client/assets/Scripts/Base/Singleton.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "0ee5b84a-8971-410f-a39d-2cf96597dd45", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Base/State.ts b/client/assets/Scripts/Base/State.ts new file mode 100644 index 0000000..02a7d48 --- /dev/null +++ b/client/assets/Scripts/Base/State.ts @@ -0,0 +1,48 @@ +import { animation, AnimationClip, Sprite, SpriteFrame } from 'cc' +import DataManager from '../Global/DataManager' +import { ResourceManager } from '../Global/ResourceManager' +import { sortSpriteFrame } from '../Utils' +import StateMachine from './StateMachine' + +/*** + * unit:milisecond + */ +export const ANIMATION_SPEED = 1 / 10 + +/*** + * 状态(每组动画的承载容器,持有SpriteAnimation组件执行播放) + */ +export default class State { + private animationClip: AnimationClip + constructor( + private fsm: StateMachine, + private path: string, + private wrapMode: AnimationClip.WrapMode = AnimationClip.WrapMode.Normal, + private force: boolean = false, + ) { + //生成动画轨道属性 + const track = new animation.ObjectTrack() + track.path = new animation.TrackPath().toComponent(Sprite).toProperty('spriteFrame') + const spriteFrames = DataManager.Instance.textureMap.get(this.path) + const frames: Array<[number, SpriteFrame]> = sortSpriteFrame(spriteFrames).map((item, index) => [ + index * ANIMATION_SPEED, + item, + ]) + track.channel.curve.assignSorted(frames) + + //动画添加轨道 + this.animationClip = new AnimationClip() + this.animationClip.name = this.path + this.animationClip.duration = frames.length * ANIMATION_SPEED + this.animationClip.addTrack(track) + this.animationClip.wrapMode = this.wrapMode + } + + run() { + if (this.fsm.animationComponent.defaultClip?.name === this.animationClip.name && !this.force) { + return + } + this.fsm.animationComponent.defaultClip = this.animationClip + this.fsm.animationComponent.play() + } +} diff --git a/client/assets/Scripts/Base/State.ts.meta b/client/assets/Scripts/Base/State.ts.meta new file mode 100644 index 0000000..8aea51d --- /dev/null +++ b/client/assets/Scripts/Base/State.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "226c1921-1459-4764-82e6-b1a11c5a73c2", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Base/StateMachine.ts b/client/assets/Scripts/Base/StateMachine.ts new file mode 100644 index 0000000..d6e16ac --- /dev/null +++ b/client/assets/Scripts/Base/StateMachine.ts @@ -0,0 +1,90 @@ +import { _decorator, Animation, Component, SpriteFrame } from 'cc' +import { FsmParamTypeEnum } from '../Enum' +const { ccclass } = _decorator +import State from './State' +import SubStateMachine from './SubStateMachine' + +type ParamsValueType = boolean | number + +export interface IParamsValue { + type: FsmParamTypeEnum + value: ParamsValueType +} + +export const getInitParamsTrigger = () => { + return { + type: FsmParamTypeEnum.Trigger, + value: false, + } +} + +export const getInitParamsNumber = () => { + return { + type: FsmParamTypeEnum.Number, + value: 0, + } +} + +/*** + * 流动图 + * 1.entity的state或者direction改变触发setter + * 2.setter里触发fsm的setParams方法 + * 3.setParams执行run方法(run方法由子类重写) + * 4.run方法会更改currentState,然后触发currentState的setter + * 5-1.如果currentState是子状态机,继续执行他的run方法,run方法又会设置子状态机的currentState,触发子状态run方法 + * 5-2.如果是子状态,run方法就是播放动画 + */ + +/*** + * 有限状态机基类 + */ +@ccclass('StateMachine') +export default abstract class StateMachine extends Component { + private _currentState: State | SubStateMachine = null + params: Map = new Map() + stateMachines: Map = new Map() + animationComponent: Animation + + getParams(paramName: string) { + if (this.params.has(paramName)) { + return this.params.get(paramName).value + } + } + + setParams(paramName: string, value: ParamsValueType) { + if (this.params.has(paramName)) { + this.params.get(paramName).value = value + this.run() + this.resetTrigger() + } + } + + get currentState() { + return this._currentState + } + + set currentState(newState) { + if (!newState) { + return + } + this._currentState = newState + this._currentState.run() + } + + /*** + * 清空所有trigger + */ + resetTrigger() { + for (const [, value] of this.params) { + if (value.type === FsmParamTypeEnum.Trigger) { + value.value = false + } + } + } + + /*** + * 由子类重写,方法目标是根据当前状态和参数修改currentState + */ + abstract init(...args: any[]): void + abstract run(): void +} diff --git a/client/assets/Scripts/Base/StateMachine.ts.meta b/client/assets/Scripts/Base/StateMachine.ts.meta new file mode 100644 index 0000000..84df8da --- /dev/null +++ b/client/assets/Scripts/Base/StateMachine.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "66538d45-0fcf-4ed2-8e47-a0a688ddaf3c", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Base/SubStateMachine.ts b/client/assets/Scripts/Base/SubStateMachine.ts new file mode 100644 index 0000000..6e6cbb3 --- /dev/null +++ b/client/assets/Scripts/Base/SubStateMachine.ts @@ -0,0 +1,30 @@ +import State from './State' +import StateMachine from './StateMachine' + +/*** + * 子有限状态机基类 + * 用处:例如有个idle的state,但是有多个方向,为了让主状态机更整洁,可以把同类型的但具体不同的state都封装在子状态机中 + */ +export default abstract class SubStateMachine { + private _currentState: State = null + stateMachines: Map = new Map() + + constructor(public fsm: StateMachine) {} + + get currentState() { + return this._currentState + } + + set currentState(newState) { + if (!newState) { + return + } + this._currentState = newState + this._currentState.run() + } + + /*** + * 具体类实现 + */ + abstract run(): void +} diff --git a/client/assets/Scripts/Base/SubStateMachine.ts.meta b/client/assets/Scripts/Base/SubStateMachine.ts.meta new file mode 100644 index 0000000..0eceebf --- /dev/null +++ b/client/assets/Scripts/Base/SubStateMachine.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "7f9fac71-9820-41b2-8b4d-2dc4185414ef", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Entity.meta b/client/assets/Scripts/Entity.meta new file mode 100644 index 0000000..fda9f82 --- /dev/null +++ b/client/assets/Scripts/Entity.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "b0c3f1a6-89a2-4921-bf10-22ae7925cf6e", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Entity/Bullet.meta b/client/assets/Scripts/Entity/Bullet.meta new file mode 100644 index 0000000..53d5649 --- /dev/null +++ b/client/assets/Scripts/Entity/Bullet.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "9265fd0c-f1ae-471b-afa0-7f17e87d408f", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Entity/Bullet/BulletManager.ts b/client/assets/Scripts/Entity/Bullet/BulletManager.ts new file mode 100644 index 0000000..4fe2b85 --- /dev/null +++ b/client/assets/Scripts/Entity/Bullet/BulletManager.ts @@ -0,0 +1,85 @@ +import { _decorator, Animation, AnimationClip, Node, Sprite, Vec3, Vec2, RigidBody2D, instantiate } from 'cc' +import { EntityManager } from '../../Base/EntityManager' +import { EntityTypeEnum, EntityStateEnum, EventEnum, PrefabPathEnum } from '../../Enum' +import DataManager, { IBullet, IVec2 } from '../../Global/DataManager' +import EventManager from '../../Global/EventManager' +import ObjectPoolManager from '../../Global/ObjectPoolManager' +import { rad2Angle } from '../../Utils' +import { ExplosionManager } from '../Explosion/ExplosionManager' +import { BulletStateMachine } from './BulletStateMachine' +const { ccclass, property } = _decorator + +@ccclass('BulletManager') +export class BulletManager extends EntityManager { + //静态数据 + id = 1 + owner = 1 + type = EntityTypeEnum.Bullet1 + + //动态数据 + position: IVec2 + direction: IVec2 + + private angle: number + + init({ id, owner, type }: IBullet) { + this.id = id + this.owner = owner + this.type = type + + this.fsm = this.addComponent(BulletStateMachine) + this.fsm.init(type) + this.state = EntityStateEnum.Idle + this.node.active = false + + EventManager.Instance.on(EventEnum.Explosion, this.handleExplosion, this) + } + + onDisable() { + EventManager.Instance.off(EventEnum.Explosion, this.handleExplosion, this) + } + + handleExplosion(id: number, { x, y }: IVec2) { + if (this.id !== id) { + return + } + + const explosion = ObjectPoolManager.Instance.getPoolObject(EntityTypeEnum.Explosion) + const explosionManager = explosion.getComponent(ExplosionManager) || explosion.addComponent(ExplosionManager) + explosionManager.init(EntityTypeEnum.Explosion, { + x, y, + }) + + ObjectPoolManager.Instance.returnPoolObject(this.node) + } + + render(data: IBullet) { + this.node.active = true + this.renderPosition(data) + this.renderDirection(data) + } + + renderPosition(data: IBullet) { + this.node.setPosition(data.position.x, data.position.y) + } + + renderDirection(data: IBullet) { + if (this.angle === undefined) { + const { x, y } = data.direction + const side = Math.sqrt(x * x + y * y) + this.angle = x > 0 ? rad2Angle(Math.asin(y / side)) : rad2Angle(Math.asin(- y / side)) + 180 + } + + this.node.setRotationFromEuler(0, 0, this.angle) + + // let angle: number, sign: number + // if (x !== 0) { + // angle = x > 0 ? rad2Angle(Math.atan(y / x)) : rad2Angle(Math.atan(-y / x)) + 180 + // sign = x > 0 ? 1 : -1 + // } else { + // angle = rad2Angle(Math.PI / 2) + // sign = y > 0 ? 1 : -1 + // } + // this.node.setRotationFromEuler(0, 0, sign * angle) + } +} diff --git a/client/assets/Scripts/Entity/Bullet/BulletManager.ts.meta b/client/assets/Scripts/Entity/Bullet/BulletManager.ts.meta new file mode 100644 index 0000000..523e643 --- /dev/null +++ b/client/assets/Scripts/Entity/Bullet/BulletManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "3cb4bec9-dd63-4ffe-9a28-8f8347cd327b", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Entity/Bullet/BulletStateMachine.ts b/client/assets/Scripts/Entity/Bullet/BulletStateMachine.ts new file mode 100644 index 0000000..3f85759 --- /dev/null +++ b/client/assets/Scripts/Entity/Bullet/BulletStateMachine.ts @@ -0,0 +1,45 @@ +import { _decorator, Animation, AnimationClip } from 'cc' +import State from '../../Base/State' +import StateMachine, { getInitParamsNumber, getInitParamsTrigger } from '../../Base/StateMachine' +import { EntityTypeEnum, TexturePathEnum, EntityStateEnum, ParamsNameEnum } from '../../Enum' +const { ccclass, property } = _decorator + +@ccclass('BulletStateMachine') +export class BulletStateMachine extends StateMachine { + type: EntityTypeEnum + init(type: EntityTypeEnum) { + this.type = type + this.animationComponent = this.node.addComponent(Animation) + + this.initParams() + this.initStateMachines() + this.initAnimationEvent() + } + + initParams() { + this.params.set(ParamsNameEnum.Idle, getInitParamsTrigger()) + } + + initStateMachines() { + this.stateMachines.set(ParamsNameEnum.Idle, new State(this, `${this.type}${EntityStateEnum.Idle}`)) + } + + initAnimationEvent() { + + } + + run() { + switch (this.currentState) { + case this.stateMachines.get(ParamsNameEnum.Idle): + if (this.params.get(ParamsNameEnum.Idle).value) { + this.currentState = this.stateMachines.get(ParamsNameEnum.Idle) + } else { + this.currentState = this.currentState + } + break + default: + this.currentState = this.stateMachines.get(ParamsNameEnum.Idle) + break + } + } +} diff --git a/client/assets/Scripts/Entity/Bullet/BulletStateMachine.ts.meta b/client/assets/Scripts/Entity/Bullet/BulletStateMachine.ts.meta new file mode 100644 index 0000000..dc1d6f4 --- /dev/null +++ b/client/assets/Scripts/Entity/Bullet/BulletStateMachine.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "531b884c-93b6-4d0e-a0fc-e8861eebf6e7", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Entity/Explosion.meta b/client/assets/Scripts/Entity/Explosion.meta new file mode 100644 index 0000000..b1fcc7a --- /dev/null +++ b/client/assets/Scripts/Entity/Explosion.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "3302ce3a-fac5-42c6-8060-e3e8682cfcf1", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Entity/Explosion/ExplosionManager.ts b/client/assets/Scripts/Entity/Explosion/ExplosionManager.ts new file mode 100644 index 0000000..16718e4 --- /dev/null +++ b/client/assets/Scripts/Entity/Explosion/ExplosionManager.ts @@ -0,0 +1,17 @@ +import { _decorator, Animation, AnimationClip, Node, Sprite, Vec3, Vec2, RigidBody2D } from 'cc' +import { EntityManager } from '../../Base/EntityManager' +import { EntityTypeEnum, EntityStateEnum, EventEnum } from '../../Enum' +import { IBullet, IVec2 } from '../../Global/DataManager' +import { ExplosionStateMachine } from './ExplosionStateMachine' +const { ccclass, property } = _decorator + +@ccclass('ExplosionManager') +export class ExplosionManager extends EntityManager { + + init(type: EntityTypeEnum, { x, y }: IVec2) { + this.node.setPosition(x, y) + this.fsm = this.addComponent(ExplosionStateMachine) + this.fsm.init(type) + this.state = EntityStateEnum.Idle + } +} diff --git a/client/assets/Scripts/Entity/Explosion/ExplosionManager.ts.meta b/client/assets/Scripts/Entity/Explosion/ExplosionManager.ts.meta new file mode 100644 index 0000000..b880475 --- /dev/null +++ b/client/assets/Scripts/Entity/Explosion/ExplosionManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "34e9e358-082f-4674-9e38-a3c27f8b013b", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Entity/Explosion/ExplosionStateMachine.ts b/client/assets/Scripts/Entity/Explosion/ExplosionStateMachine.ts new file mode 100644 index 0000000..60738e2 --- /dev/null +++ b/client/assets/Scripts/Entity/Explosion/ExplosionStateMachine.ts @@ -0,0 +1,52 @@ +import { _decorator, Animation, AnimationClip } from 'cc' +import State from '../../Base/State' +import StateMachine, { getInitParamsNumber, getInitParamsTrigger } from '../../Base/StateMachine' +import { EntityTypeEnum, TexturePathEnum, EntityStateEnum, ParamsNameEnum } from '../../Enum' +import ObjectPoolManager from '../../Global/ObjectPoolManager' +const { ccclass, property } = _decorator + +@ccclass('ExplosionStateMachine') +export class ExplosionStateMachine extends StateMachine { + type: EntityTypeEnum + init(type: EntityTypeEnum) { + this.type = type + this.animationComponent = this.node.addComponent(Animation) + + this.initParams() + this.initStateMachines() + this.initAnimationEvent() + } + + initParams() { + this.params.set(ParamsNameEnum.Idle, getInitParamsTrigger()) + } + + initStateMachines() { + this.stateMachines.set(ParamsNameEnum.Idle, new State(this, `${this.type}${EntityStateEnum.Idle}`)) + } + + initAnimationEvent() { + this.animationComponent.on(Animation.EventType.FINISHED, () => { + const whiteList = [EntityStateEnum.Idle] + const name = this.animationComponent.defaultClip.name + if (whiteList.some(v => name.includes(v))) { + ObjectPoolManager.Instance.returnPoolObject(this.node) + } + }) + } + + run() { + switch (this.currentState) { + case this.stateMachines.get(ParamsNameEnum.Idle): + if (this.params.get(ParamsNameEnum.Idle).value) { + this.currentState = this.stateMachines.get(ParamsNameEnum.Idle) + } else { + this.currentState = this.currentState + } + break + default: + this.currentState = this.stateMachines.get(ParamsNameEnum.Idle) + break + } + } +} diff --git a/client/assets/Scripts/Entity/Explosion/ExplosionStateMachine.ts.meta b/client/assets/Scripts/Entity/Explosion/ExplosionStateMachine.ts.meta new file mode 100644 index 0000000..55a003d --- /dev/null +++ b/client/assets/Scripts/Entity/Explosion/ExplosionStateMachine.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "35a9f553-26d5-49c8-bcc0-d1011c07e124", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Entity/Player.meta b/client/assets/Scripts/Entity/Player.meta new file mode 100644 index 0000000..9007398 --- /dev/null +++ b/client/assets/Scripts/Entity/Player.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "5802fd2f-7823-4294-91c8-d71adca41319", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Entity/Player/PlayerManager.ts b/client/assets/Scripts/Entity/Player/PlayerManager.ts new file mode 100644 index 0000000..70dad68 --- /dev/null +++ b/client/assets/Scripts/Entity/Player/PlayerManager.ts @@ -0,0 +1,118 @@ +import { _decorator, Vec2, RigidBody2D, BoxCollider2D, Size, ERigidBody2DType, Prefab, instantiate, Input, ProgressBar, Label } from 'cc'; +import { EntityManager } from '../../Base/EntityManager'; +import { EntityTypeEnum, EntityStateEnum, EventEnum, InputType, PrefabPathEnum } from '../../Enum'; +import DataManager, { IPlayer, IVec2 } from '../../Global/DataManager'; +import EventManager from '../../Global/EventManager'; +import { ResourceManager } from '../../Global/ResourceManager'; +import { rad2Angle } from '../../Utils'; +import { WeaponManager } from '../Weapon/WeaponManager'; +import { PlayerStateMachine } from './PlayerStateMachine'; +const { ccclass, property } = _decorator; + +@ccclass('PlayerManager') +export class PlayerManager extends EntityManager { + //静态数据 + id = 1 + nickname = '' + type = EntityTypeEnum.Player1 + weaponType = EntityTypeEnum.Weapon1 + bulletType = EntityTypeEnum.Bullet1 + + //动态数据 + hp: number + position: IVec2 + direction: IVec2 + + private hpBar: ProgressBar + private nicknameLabel: Label + private weapon: WeaponManager + + get isSelf() { + return DataManager.Instance.myPlayerId === this.id + } + + init(data: IPlayer) { + const { id, nickname, type, weaponType, bulletType } = data + this.id = id + this.nickname = nickname + this.type = type + this.weaponType = weaponType + this.bulletType = bulletType + + this.hpBar = this.node.getComponentInChildren(ProgressBar) + this.nicknameLabel = this.node.getComponentInChildren(Label) + this.nicknameLabel.string = data.nickname + + this.fsm = this.addComponent(PlayerStateMachine) + this.fsm.init(type) + + const weaponPrefab = DataManager.Instance.prefabMap.get(this.weaponType) + const weapon = instantiate(weaponPrefab) + weapon.setParent(this.node) + this.weapon = weapon.addComponent(WeaponManager) + this.weapon.init(data) + } + + tick(dt: number) { + if (!this.isSelf) { + return + } + + // if (!DataManager.Instance.jm.input.length()) { + // return + // } + + const { x, y } = DataManager.Instance.jm.input + DataManager.Instance.applyInput({ + type: InputType.PlayerMove, + id: this.id, + direction: { + x, + y + }, + dt + }) + } + + render(data: IPlayer) { + this.renderHP(data) + this.renderPosition(data) + this.renderDirection(data) + } + + renderHP(data: IPlayer) { + this.hpBar.progress = data.hp / this.hpBar.totalLength + } + + renderPosition(data: IPlayer) { + this.node.setPosition(data.position.x, data.position.y) + } + + renderDirection(data: IPlayer) { + if (data.direction.x === 0 && data.direction.y === 0) { + this.state = EntityStateEnum.Idle + return + } + this.state = EntityStateEnum.Run + const { x, y } = data.direction + if (x !== 0) { + this.node.setScale(x > 0 ? 1 : -1, 1) + this.nicknameLabel.node.setScale(x > 0 ? 1 : -1, 1) + } + const side = Math.sqrt(x * x + y * y) + const angle = rad2Angle(Math.asin(y / side)) + this.weapon.node.setRotationFromEuler(0, 0, angle) + + // const { x, y } = joystick.input + // let angle: number, sign: number + // if (x !== 0) { + // angle = rad2Angle(Math.atan(y / x)) + // sign = joystick.input.x > 0 ? 1 : -1 + // } else { + // angle = rad2Angle(Math.PI / 2) + // sign = joystick.input.y > 0 ? 1 : -1 + // } + // this.node.setRotationFromEuler(0, 0, sign * angle) + } +} + diff --git a/client/assets/Scripts/Entity/Player/PlayerManager.ts.meta b/client/assets/Scripts/Entity/Player/PlayerManager.ts.meta new file mode 100644 index 0000000..b8cac2f --- /dev/null +++ b/client/assets/Scripts/Entity/Player/PlayerManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "4cc81cda-b869-4eb8-855e-126f16aa7a12", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Entity/Player/PlayerStateMachine.ts b/client/assets/Scripts/Entity/Player/PlayerStateMachine.ts new file mode 100644 index 0000000..c014448 --- /dev/null +++ b/client/assets/Scripts/Entity/Player/PlayerStateMachine.ts @@ -0,0 +1,49 @@ +import { _decorator, Animation, AnimationClip } from 'cc' +import State from '../../Base/State' +import StateMachine, { getInitParamsNumber, getInitParamsTrigger } from '../../Base/StateMachine' +import { EntityTypeEnum, EntityStateEnum, ParamsNameEnum } from '../../Enum' +const { ccclass, property } = _decorator + +@ccclass('PlayerStateMachine') +export class PlayerStateMachine extends StateMachine { + type: EntityTypeEnum + + init(type: EntityTypeEnum) { + this.type = type + this.animationComponent = this.node.addComponent(Animation) + this.initParams() + this.initStateMachines() + this.initAnimationEvent() + } + + initParams() { + this.params.set(ParamsNameEnum.Idle, getInitParamsTrigger()) + this.params.set(ParamsNameEnum.Run, getInitParamsTrigger()) + } + + initStateMachines() { + this.stateMachines.set(ParamsNameEnum.Idle, new State(this, `${this.type}${EntityStateEnum.Idle}`, AnimationClip.WrapMode.Loop)) + this.stateMachines.set(ParamsNameEnum.Run, new State(this, `${this.type}${EntityStateEnum.Run}`, AnimationClip.WrapMode.Loop)) + } + + initAnimationEvent() { + } + + run() { + switch (this.currentState) { + case this.stateMachines.get(ParamsNameEnum.Idle): + case this.stateMachines.get(ParamsNameEnum.Run): + if (this.params.get(ParamsNameEnum.Run).value) { + this.currentState = this.stateMachines.get(ParamsNameEnum.Run) + } else if (this.params.get(ParamsNameEnum.Idle).value) { + this.currentState = this.stateMachines.get(ParamsNameEnum.Idle) + } else { + this.currentState = this.currentState + } + break + default: + this.currentState = this.stateMachines.get(ParamsNameEnum.Idle) + break + } + } +} diff --git a/client/assets/Scripts/Entity/Player/PlayerStateMachine.ts.meta b/client/assets/Scripts/Entity/Player/PlayerStateMachine.ts.meta new file mode 100644 index 0000000..7ea536c --- /dev/null +++ b/client/assets/Scripts/Entity/Player/PlayerStateMachine.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "3bdb087b-0d43-4b85-81e4-e480cd43405d", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Entity/Weapon.meta b/client/assets/Scripts/Entity/Weapon.meta new file mode 100644 index 0000000..7eeeddd --- /dev/null +++ b/client/assets/Scripts/Entity/Weapon.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "b8a46a8b-5505-436b-8870-2965599d2168", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Entity/Weapon/WeaponManager.ts b/client/assets/Scripts/Entity/Weapon/WeaponManager.ts new file mode 100644 index 0000000..cc43014 --- /dev/null +++ b/client/assets/Scripts/Entity/Weapon/WeaponManager.ts @@ -0,0 +1,73 @@ +import { _decorator, Animation, AnimationClip, Node, Sprite, Vec3, Vec2, UITransform } from 'cc' +import { EntityManager } from '../../Base/EntityManager' +import { EntityTypeEnum, EntityStateEnum, EventEnum, InputType } from '../../Enum' +import DataManager, { IPlayer } from '../../Global/DataManager' +import EventManager from '../../Global/EventManager' +import { WeaponStateMachine } from './WeaponStateMachine' +const { ccclass, property } = _decorator + +@ccclass('WeaponManager') +export class WeaponManager extends EntityManager { + owner = 1 + type = EntityTypeEnum.Weapon1 + + private body: Node + private anchor: Node + private point: Node + + get isSelf() { + return DataManager.Instance.myPlayerId === this.owner + } + + init({ id, weaponType }: IPlayer) { + this.owner = id + + this.type = weaponType + + this.node.setSiblingIndex(0) + this.body = this.node.getChildByName("Body") + this.anchor = this.body.getChildByName("Anchor") + this.point = this.anchor.getChildByName("Point") + + this.fsm = this.body.addComponent(WeaponStateMachine) + this.fsm.init(weaponType) + this.state = EntityStateEnum.Idle + + + EventManager.Instance.on(EventEnum.WeaponShoot, this.handleWeaponShoot, this) + this.isSelf && EventManager.Instance.on(EventEnum.ShootBtnClick, this.handleShootBtnClick, this) + } + + onDestroy() { + this.isSelf && EventManager.Instance.off(EventEnum.ShootBtnClick, this.handleShootBtnClick, this) + EventManager.Instance.off(EventEnum.WeaponShoot, this.handleWeaponShoot, this) + } + + handleWeaponShoot(id: number) { + if (this.owner !== id) { + return + } + + this.state = EntityStateEnum.Attack + } + + handleShootBtnClick() { + const pointWorldPos = this.point.getWorldPosition() + const pointStagePos = DataManager.Instance.gm.stage.getComponent(UITransform).convertToNodeSpaceAR(pointWorldPos); + const anchorWorldPos = this.anchor.getWorldPosition() + const directionVec2 = new Vec2(pointWorldPos.x - anchorWorldPos.x, pointWorldPos.y - anchorWorldPos.y).normalize() + + DataManager.Instance.applyInput({ + type: InputType.WeaponShoot, + owner: this.owner, + position: { + x: pointStagePos.x, + y: pointStagePos.y + }, + direction: { + x: directionVec2.x, + y: directionVec2.y + }, + }) + } +} diff --git a/client/assets/Scripts/Entity/Weapon/WeaponManager.ts.meta b/client/assets/Scripts/Entity/Weapon/WeaponManager.ts.meta new file mode 100644 index 0000000..e3b8bff --- /dev/null +++ b/client/assets/Scripts/Entity/Weapon/WeaponManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "eefb7dfd-3b96-46cc-a83a-c5bafe656d8a", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Entity/Weapon/WeaponStateMachine.ts b/client/assets/Scripts/Entity/Weapon/WeaponStateMachine.ts new file mode 100644 index 0000000..4ee64eb --- /dev/null +++ b/client/assets/Scripts/Entity/Weapon/WeaponStateMachine.ts @@ -0,0 +1,58 @@ +import { _decorator, Animation, AnimationClip } from 'cc' +import State from '../../Base/State' +import StateMachine, { getInitParamsNumber, getInitParamsTrigger } from '../../Base/StateMachine' +import { EntityStateEnum, EntityTypeEnum, ParamsNameEnum } from '../../Enum' +import { WeaponManager } from './WeaponManager' +const { ccclass, property } = _decorator + +@ccclass('WeaponStateMachine') +export class WeaponStateMachine extends StateMachine { + type: EntityTypeEnum + + init(type: EntityTypeEnum) { + this.type = type + this.animationComponent = this.node.addComponent(Animation) + + this.initParams() + this.initStateMachines() + this.initAnimationEvent() + } + + initParams() { + this.params.set(ParamsNameEnum.Idle, getInitParamsTrigger()) + this.params.set(ParamsNameEnum.Attack, getInitParamsTrigger()) + } + + initStateMachines() { + this.stateMachines.set(ParamsNameEnum.Idle, new State(this, `${this.type}${EntityStateEnum.Idle}`)) + this.stateMachines.set(ParamsNameEnum.Attack, new State(this, `${this.type}${EntityStateEnum.Attack}`, AnimationClip.WrapMode.Normal, true)) + } + + initAnimationEvent() { + this.animationComponent.on(Animation.EventType.FINISHED, () => { + const whiteList = [EntityStateEnum.Attack] + const name = this.animationComponent.defaultClip.name + if (whiteList.some(v => name.includes(v))) { + this.node.parent.getComponent(WeaponManager).state = EntityStateEnum.Idle + } + }) + } + + run() { + switch (this.currentState) { + case this.stateMachines.get(ParamsNameEnum.Idle): + case this.stateMachines.get(ParamsNameEnum.Attack): + if (this.params.get(ParamsNameEnum.Attack).value) { + this.currentState = this.stateMachines.get(ParamsNameEnum.Attack) + } if (this.params.get(ParamsNameEnum.Idle).value) { + this.currentState = this.stateMachines.get(ParamsNameEnum.Idle) + } else { + this.currentState = this.currentState + } + break + default: + this.currentState = this.stateMachines.get(ParamsNameEnum.Idle) + break + } + } +} diff --git a/client/assets/Scripts/Entity/Weapon/WeaponStateMachine.ts.meta b/client/assets/Scripts/Entity/Weapon/WeaponStateMachine.ts.meta new file mode 100644 index 0000000..e9262ca --- /dev/null +++ b/client/assets/Scripts/Entity/Weapon/WeaponStateMachine.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "1eed66f0-cb8f-4cc9-9f91-aa21b5c2883c", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Enum.meta b/client/assets/Scripts/Enum.meta new file mode 100644 index 0000000..8186b8c --- /dev/null +++ b/client/assets/Scripts/Enum.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "5b95c11b-0954-45ac-99ba-98df4825c906", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Enum/index.ts b/client/assets/Scripts/Enum/index.ts new file mode 100644 index 0000000..e7f54ed --- /dev/null +++ b/client/assets/Scripts/Enum/index.ts @@ -0,0 +1,68 @@ +export enum FsmParamTypeEnum { + Number = 'Number', + Trigger = 'Trigger', +} + +export enum EntityStateEnum { + Idle = 'Idle', + Run = 'Run', + Attack = 'Attack', +} + +export enum ParamsNameEnum { + Idle = 'Idle', + Run = 'Run', + Attack = 'Attack', +} + +export enum EventEnum { + ShootBtnClick = 'ShootBtnClick', + WeaponShoot = 'WeaponShoot', + Explosion = 'Explosion' +} + +export enum EntityTypeEnum { + Map1 = 'Map1', + Player1 = 'Player1', + Player2 = 'Player2', + Weapon1 = 'Weapon1', + Weapon2 = 'Weapon2', + Bullet1 = 'Bullet1', + Bullet2 = 'Bullet2', + Explosion = 'Explosion', + JoyStick = 'JoyStick', + Shoot = 'Shoot', +} + +export enum PrefabPathEnum { + Map1 = 'prefab/Map1', + Player1 = 'prefab/Player', + Player2 = 'prefab/Player', + Weapon1 = 'prefab/Weapon1', + Weapon2 = 'prefab/Weapon2', + Bullet1 = 'prefab/Bullet', + Bullet2 = 'prefab/Bullet', + Explosion = 'prefab/Explosion', + JoyStick = 'prefab/JoyStick', + Shoot = 'prefab/Shoot', +} + +export enum TexturePathEnum { + Player1Idle = 'texture/player/player1/idle', + Player1Run = 'texture/player/player1/run', + Player2Idle = 'texture/player/player2/idle', + Player2Run = 'texture/player/player2/run', + Weapon1Idle = 'texture/weapon/weapon1/idle', + Weapon1Attack = 'texture/weapon/weapon1/attack', + Weapon2Idle = 'texture/weapon/weapon2/idle', + Weapon2Attack = 'texture/weapon/weapon2/attack', + Bullet1Idle = 'texture/bullet/bullet1', + Bullet2Idle = 'texture/bullet/bullet2', + ExplosionIdle = 'texture/explosion', +} + +export enum InputType { + PlayerMove = 'PlayerMove', + WeaponShoot = 'WeaponShoot', + TimePast = 'TimePast', +} \ No newline at end of file diff --git a/client/assets/Scripts/Enum/index.ts.meta b/client/assets/Scripts/Enum/index.ts.meta new file mode 100644 index 0000000..1142982 --- /dev/null +++ b/client/assets/Scripts/Enum/index.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "393286c2-7b09-44d1-955f-049e7e5b36ea", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Global.meta b/client/assets/Scripts/Global.meta new file mode 100644 index 0000000..21feef9 --- /dev/null +++ b/client/assets/Scripts/Global.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "6262be8a-effd-4208-89cd-6532b055b4a0", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Global/DataManager.ts b/client/assets/Scripts/Global/DataManager.ts new file mode 100644 index 0000000..5ccc704 --- /dev/null +++ b/client/assets/Scripts/Global/DataManager.ts @@ -0,0 +1,164 @@ +import { Input, Prefab, SpriteFrame } from 'cc' +import Singleton from '../Base/Singleton' +import { BulletManager } from '../Entity/Bullet/BulletManager' +import { PlayerManager } from '../Entity/Player/PlayerManager' +import { WeaponManager } from '../Entity/Weapon/WeaponManager' +import { EntityStateEnum, EntityTypeEnum, EventEnum, InputType } from '../Enum' +import { BattleManager } from '../Scene/BattleManager' +import { JoyStickManager } from '../UI/JoyStickManager' +import EventManager from './EventManager' +import ObjectPoolManager from './ObjectPoolManager' + +export type IPlayer = Pick +export type IBullet = Pick + +const PLAYER_SPEED = 100 +const BULLET_SPEED = 600 + +const WEAPON_DAMAGE = 5 + +const PLAYER_RADIUS = 50 +const BULLET_RADIUS = 10 + +export interface IVec2 { + x: number; + y: number +} + +interface IState { + players: IPlayer[], + bullets: IBullet[], + nextBulletId: number +} + +interface IPlayerMove { + type: InputType.PlayerMove + id: number; + direction: IVec2; + dt: number + +} + +interface IWeaponShoot { + type: InputType.WeaponShoot + owner: number; + position: IVec2; + direction: IVec2; +} + +interface ITimePast { + type: InputType.TimePast; + dt: number +} + +export default class DataManager extends Singleton { + static get Instance() { + return super.GetInstance() + } + + gm: BattleManager + jm: JoyStickManager + myPlayerId = 1 + + prefabMap: Map = new Map() + textureMap: Map = new Map() + + playerMap: Map = new Map() + bulletMap: Map = new Map() + + state: IState = { + players: [{ + id: 2, + nickname: "哈哈1", + position: { + x: -200, + y: -200 + }, + direction: { + x: 1, + y: 0 + }, + hp: 100, + type: EntityTypeEnum.Player1, + weaponType: EntityTypeEnum.Weapon1, + bulletType: EntityTypeEnum.Bullet1, + }, { + id: 1, + nickname: "哈哈2", + position: { + x: 200, + y: 200 + }, + direction: { + x: 0, + y: -1 + }, + hp: 100, + type: EntityTypeEnum.Player2, + weaponType: EntityTypeEnum.Weapon2, + bulletType: EntityTypeEnum.Bullet2, + }], + bullets: [], + nextBulletId: 1 + } + + applyInput(input: IPlayerMove | IWeaponShoot | ITimePast) { + switch (input.type) { + case InputType.PlayerMove: { + const { direction: { x, y }, dt, id } = input + const player = this.state.players.find(e => e.id === id) + if (!player) { + return + } + + player.position.x += x * PLAYER_SPEED * dt + player.position.y += y * PLAYER_SPEED * dt + + player.direction = { x, y } + + break + } + + case InputType.WeaponShoot: { + const { owner, position, direction } = input + const bullet: IBullet = { + id: this.state.nextBulletId++, + owner, + position, + direction, + type: this.playerMap.get(owner).bulletType + } + this.state.bullets.push(bullet) + + EventManager.Instance.emit(EventEnum.WeaponShoot, owner) + break + } + case InputType.TimePast: { + const { dt } = input + const { bullets, players } = this.state + + for (let i = bullets.length - 1; i >= 0; i--) { + const bullet = bullets[i]; + for (let j = players.length - 1; j >= 0; j--) { + const player = players[j]; + if (((player.position.x - bullet.position.x) ** 2 + (player.position.y - bullet.position.y) ** 2) < (PLAYER_RADIUS + BULLET_RADIUS) ** 2) { + EventManager.Instance.emit(EventEnum.Explosion, bullet.id, { + x: (player.position.x + bullet.position.x) / 2, + y: (player.position.y + bullet.position.y) / 2, + }) + + player.hp -= WEAPON_DAMAGE + bullets.splice(i, 1) + break + } + } + } + + for (const bullet of this.state.bullets) { + bullet.position.x += bullet.direction.x * BULLET_SPEED * dt + bullet.position.y += bullet.direction.y * BULLET_SPEED * dt + } + } + } + } +} diff --git a/client/assets/Scripts/Global/DataManager.ts.meta b/client/assets/Scripts/Global/DataManager.ts.meta new file mode 100644 index 0000000..59ef882 --- /dev/null +++ b/client/assets/Scripts/Global/DataManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "1682ed16-4e4f-46b3-8aca-92baecd30b9d", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Global/EventManager.ts b/client/assets/Scripts/Global/EventManager.ts new file mode 100644 index 0000000..12ff955 --- /dev/null +++ b/client/assets/Scripts/Global/EventManager.ts @@ -0,0 +1,42 @@ +import Singleton from '../Base/Singleton'; +import { EventEnum } from '../Enum'; + +interface IItem { + func: Function; + ctx: unknown; +} + +export default class EventManager extends Singleton { + static get Instance() { + return super.GetInstance(); + } + + private eventMap: Map> = new Map(); + + on(event: EventEnum, func: Function, ctx?: unknown) { + if (this.eventMap.has(event)) { + this.eventMap.get(event).push({ func, ctx }); + } else { + this.eventMap.set(event, [{ func, ctx }]); + } + } + + off(event: EventEnum, func: Function, ctx?: unknown) { + if (this.eventMap.has(event)) { + const index = this.eventMap.get(event).findIndex(i => func === i.func && i.ctx === ctx); + index > -1 && this.eventMap.get(event).splice(index, 1); + } + } + + emit(event: EventEnum, ...params: unknown[]) { + if (this.eventMap.has(event)) { + this.eventMap.get(event).forEach(({ func, ctx }) => { + ctx ? func.apply(ctx, params) : func(...params); + }); + } + } + + clear() { + this.eventMap.clear(); + } +} diff --git a/client/assets/Scripts/Global/EventManager.ts.meta b/client/assets/Scripts/Global/EventManager.ts.meta new file mode 100644 index 0000000..b29026a --- /dev/null +++ b/client/assets/Scripts/Global/EventManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "2aa2e7de-b014-4ee7-a537-4bc99dbf9164", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Global/NetworkManager.ts b/client/assets/Scripts/Global/NetworkManager.ts new file mode 100644 index 0000000..5534c34 --- /dev/null +++ b/client/assets/Scripts/Global/NetworkManager.ts @@ -0,0 +1,44 @@ +import Singleton from '../Base/Singleton' + +export default class NetworkManager extends Singleton { + static get Instance() { + return super.GetInstance() + } + + ws: WebSocket + port = 8888 + + connect() { + return new Promise((resolve, reject) => { + this.ws = new WebSocket(`ws://localhost:${this.port}`) + this.ws.onopen = () => { + console.log("ws onopen") + resolve(null) + } + + this.ws.onerror = () => { + console.log("ws onerror") + reject() + } + + this.ws.onclose = () => { + console.log("ws onclose") + reject() + } + + this.ws.onmessage = (data) => { + console.log("onmessage", data); + + } + }) + + } + + sendMsg(data) { + this.ws.send(data) + } + + async callApi(path: string) { + return await fetch(`http://localhost:${this.port}${path}`).then((res) => res.json()) + } +} diff --git a/client/assets/Scripts/Global/NetworkManager.ts.meta b/client/assets/Scripts/Global/NetworkManager.ts.meta new file mode 100644 index 0000000..c491434 --- /dev/null +++ b/client/assets/Scripts/Global/NetworkManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "588dfbf5-0456-472f-8382-746392fb1a06", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Global/ObjectPoolManager.ts b/client/assets/Scripts/Global/ObjectPoolManager.ts new file mode 100644 index 0000000..fa3f6cc --- /dev/null +++ b/client/assets/Scripts/Global/ObjectPoolManager.ts @@ -0,0 +1,52 @@ +import Singleton from '../Base/Singleton' +import { instantiate, Node, Prefab } from 'cc' +import { EntityTypeEnum } from '../Enum' +import DataManager from './DataManager' +import { ResourceManager } from './ResourceManager' + +export default class ObjectPoolManager extends Singleton { + static get Instance() { + return super.GetInstance() + } + + private objectPool: Node = null + private poolObjectMap: Map = new Map() + + private getObjectContainerName(objectName: EntityTypeEnum) { + return objectName + 'Pool' + } + + getPoolObject(objectName: EntityTypeEnum) { + if (this.objectPool === null) { + this.objectPool = new Node("ObjectPool") + this.objectPool.setParent(DataManager.Instance.gm.stage) + } + + if (!this.poolObjectMap.has(objectName)) { + this.poolObjectMap.set(objectName, []) + const container = new Node(this.getObjectContainerName(objectName)) + container.setParent(this.objectPool) + } + + let node: Node + const nodes = this.poolObjectMap.get(objectName) + const index = nodes.findIndex(node => node.active) + + if (index === -1) { + const prefab = DataManager.Instance.prefabMap.get(objectName) + node = instantiate(prefab) + node.name = objectName + node.setParent(this.objectPool.getChildByName(this.getObjectContainerName(objectName))) + } else { + node = nodes.splice(index, 1)[0] + } + node.active = true + return node + } + + returnPoolObject(object: Node) { + object.active = false + const objectName = object.name as EntityTypeEnum + this.poolObjectMap.get(objectName).push(object) + } +} diff --git a/client/assets/Scripts/Global/ObjectPoolManager.ts.meta b/client/assets/Scripts/Global/ObjectPoolManager.ts.meta new file mode 100644 index 0000000..b263a29 --- /dev/null +++ b/client/assets/Scripts/Global/ObjectPoolManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "01a37612-1a4a-45ee-8be8-3e3360996442", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Global/ResourceManager.ts b/client/assets/Scripts/Global/ResourceManager.ts new file mode 100644 index 0000000..af1b731 --- /dev/null +++ b/client/assets/Scripts/Global/ResourceManager.ts @@ -0,0 +1,32 @@ +import { _decorator, resources, SpriteFrame, Asset } from 'cc' +import Singleton from '../Base/Singleton' + +export class ResourceManager extends Singleton { + static get Instance() { + return super.GetInstance() + } + + loadRes(path: string, type: new (...args: any[]) => T) { + return new Promise((resolve, reject) => { + resources.load(path, type, (err, res) => { + if (err) { + reject(err) + return + } + resolve(res) + }) + }) + } + + loadDir(path: string, type: new (...args: any[]) => T) { + return new Promise((resolve, reject) => { + resources.loadDir(path, type, (err, res) => { + if (err) { + reject(err) + return + } + resolve(res) + }) + }) + } +} diff --git a/client/assets/Scripts/Global/ResourceManager.ts.meta b/client/assets/Scripts/Global/ResourceManager.ts.meta new file mode 100644 index 0000000..c70835e --- /dev/null +++ b/client/assets/Scripts/Global/ResourceManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "6278727d-3641-46d1-ae43-52b7829402d1", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Scene.meta b/client/assets/Scripts/Scene.meta new file mode 100644 index 0000000..93b167c --- /dev/null +++ b/client/assets/Scripts/Scene.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "7129d004-4256-413c-a2e9-34ee8607d89d", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Scene/BattleManager.ts b/client/assets/Scripts/Scene/BattleManager.ts new file mode 100644 index 0000000..b26aa6c --- /dev/null +++ b/client/assets/Scripts/Scene/BattleManager.ts @@ -0,0 +1,156 @@ +import { _decorator, Component, Node, resources, Prefab, instantiate, Vec2, SpriteFrame } from 'cc'; +import { PlayerManager } from '../Entity/Player/PlayerManager'; +import DataManager from '../Global/DataManager'; +import { JoyStickManager } from '../UI/JoyStickManager'; +import { ResourceManager } from '../Global/ResourceManager'; +import { EntityTypeEnum, InputType, PrefabPathEnum, TexturePathEnum } from '../Enum'; +import NetworkManager from '../Global/NetworkManager'; +import ObjectPoolManager from '../Global/ObjectPoolManager'; +import { BulletManager } from '../Entity/Bullet/BulletManager'; + +const { ccclass, property, requireComponent } = _decorator; + +@ccclass('BattleManager') +export class BattleManager extends Component { + stage: Node + ui: Node + + isInited = false + + + onLoad() { + DataManager.Instance.gm = this + this.stage = this.node.getChildByName("Stage") + this.ui = this.node.getChildByName("UI") + } + + async start() { + this.clearGame() + await this.loadRes() + await this.initScene() + this.isInited = true + } + + clearGame() { + this.stage.destroyAllChildren() + this.ui.destroyAllChildren() + } + + async initScene() { + // await NetworkManager.Instance.connect() + // NetworkManager.Instance.sendMsg("我是客户端!!") + // const data = await NetworkManager.Instance.callApi("/join") + // console.log("data", data); + await Promise.all([ + this.initJoyStick(), + this.initFire(), + this.initMap(), + ]) + + } + + async loadRes() { + const list = [] + for (const type in PrefabPathEnum) { + const p = ResourceManager.Instance.loadRes(PrefabPathEnum[type], Prefab).then((prefab) => { + DataManager.Instance.prefabMap.set(type, prefab) + }) + list.push(p) + } + for (const type in TexturePathEnum) { + const p = ResourceManager.Instance.loadDir(TexturePathEnum[type], SpriteFrame).then((spriteFrames) => { + DataManager.Instance.textureMap.set(type, spriteFrames) + }) + list.push(p) + } + await Promise.all(list) + } + + + async initJoyStick() { + const joySitckPrefab = await ResourceManager.Instance.loadRes(PrefabPathEnum[EntityTypeEnum.JoyStick], Prefab) + const joySitck = instantiate(joySitckPrefab) + joySitck.setParent(this.ui) + const jm = DataManager.Instance.jm = joySitck.getComponent(JoyStickManager) + await jm.init() + } + + async initFire() { + const firePrefab = await ResourceManager.Instance.loadRes(PrefabPathEnum[EntityTypeEnum.Shoot], Prefab) + const fire = instantiate(firePrefab) + fire.setParent(this.ui) + } + + async initMap() { + const mapPrefab = await ResourceManager.Instance.loadRes(PrefabPathEnum[EntityTypeEnum.Map1], Prefab) + const map = instantiate(mapPrefab) + map.setParent(this.stage) + } + + update(dt: number) { + if (!this.isInited) { + return + } + this.render() + this.tick(dt) + } + + tick(dt: number) { + this.tickPlayer(dt) + + DataManager.Instance.applyInput({ + type: InputType.TimePast, + dt + }) + } + + tickPlayer(dt: number) { + const players = DataManager.Instance.state.players + + for (const p of players) { + const playerManager = DataManager.Instance.playerMap.get(p.id) + if (!playerManager) { + return + } + playerManager.tick(dt) + } + } + + render() { + this.renderPlayer() + this.renderBullet() + } + + renderPlayer() { + const players = DataManager.Instance.state.players + for (const p of players) { + let playerManager = DataManager.Instance.playerMap.get(p.id) + if (!playerManager) { + const playerPrefab = DataManager.Instance.prefabMap.get(p.type) + const player = instantiate(playerPrefab) + player.setParent(this.stage) + playerManager = player.addComponent(PlayerManager) + DataManager.Instance.playerMap.set(p.id, playerManager) + playerManager.init(p) + } else { + playerManager.render(p) + } + } + } + + renderBullet() { + const bullets = DataManager.Instance.state.bullets + for (const b of bullets) { + let bulletManager = DataManager.Instance.bulletMap.get(b.id) + if (!bulletManager) { + const bullet = ObjectPoolManager.Instance.getPoolObject(b.type) + bulletManager = bullet.getComponent(BulletManager) || bullet.addComponent(BulletManager) + DataManager.Instance.bulletMap.set(b.id, bulletManager) + bulletManager.init(b) + } else { + bulletManager.render(b) + } + } + } +} + diff --git a/client/assets/Scripts/Scene/BattleManager.ts.meta b/client/assets/Scripts/Scene/BattleManager.ts.meta new file mode 100644 index 0000000..41b4d00 --- /dev/null +++ b/client/assets/Scripts/Scene/BattleManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "d8c46424-e6ab-4d22-af07-293ce98d8b5b", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/UI.meta b/client/assets/Scripts/UI.meta new file mode 100644 index 0000000..5036d1c --- /dev/null +++ b/client/assets/Scripts/UI.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "03ce230a-7d62-422c-b453-aafdbec11e91", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/UI/JoyStickManager.ts b/client/assets/Scripts/UI/JoyStickManager.ts new file mode 100644 index 0000000..20c75ae --- /dev/null +++ b/client/assets/Scripts/UI/JoyStickManager.ts @@ -0,0 +1,58 @@ +import { _decorator, Component, Node, input, Input, EventTouch, Vec2, Vec3, UITransform } from 'cc'; +const { ccclass, property } = _decorator; + +@ccclass('JoyStickManager') +export class JoyStickManager extends Component { + input: Vec2 = new Vec2(0, 0) + + private body: Node + private stick: Node + private touchStartPos: Vec2 + private defaultPos: Vec2 + private radius: number = 0 + + async init() { + this.body = this.node.getChildByName("Body") + this.stick = this.body.getChildByName("Stick") + const { x, y } = this.body.position + this.defaultPos = new Vec2(x, y) + this.radius = this.body.getComponent(UITransform).contentSize.x / 2 + + input.on(Input.EventType.TOUCH_START, this.onTouchMove, this); + input.on(Input.EventType.TOUCH_MOVE, this.onTouchMove, this); + input.on(Input.EventType.TOUCH_END, this.onTouchEnd, this); + + } + + onDestroy() { + input.off(Input.EventType.TOUCH_START, this.onTouchMove, this); + input.off(Input.EventType.TOUCH_MOVE, this.onTouchMove, this); + input.off(Input.EventType.TOUCH_END, this.onTouchEnd, this); + } + + onTouchMove(e: EventTouch) { + const touchPos = e.touch.getUILocation() + if (!this.touchStartPos) { + this.touchStartPos = touchPos.clone() + this.body.setPosition(this.touchStartPos.x, this.touchStartPos.y); + } + + const stickPos = new Vec2(touchPos.x - this.touchStartPos.x, touchPos.y - this.touchStartPos.y) + // const stickPos = new Vec2(0, touchPos.y - this.touchStartPos.y) + const len = stickPos.length() + if (len > this.radius) { + stickPos.multiplyScalar(this.radius / len) + } + + this.stick.setPosition(stickPos.x, stickPos.y) + this.input = stickPos.clone().normalize() + } + + onTouchEnd() { + this.body.setPosition(this.defaultPos.x, this.defaultPos.y) + this.stick.setPosition(0, 0) + this.touchStartPos = undefined + this.input = new Vec2(0, 0) + } +} + diff --git a/client/assets/Scripts/UI/JoyStickManager.ts.meta b/client/assets/Scripts/UI/JoyStickManager.ts.meta new file mode 100644 index 0000000..f144655 --- /dev/null +++ b/client/assets/Scripts/UI/JoyStickManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "bfc9a6e3-7ecf-4422-af5c-670bff4ec928", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/UI/ShootManager.ts b/client/assets/Scripts/UI/ShootManager.ts new file mode 100644 index 0000000..8d21fd9 --- /dev/null +++ b/client/assets/Scripts/UI/ShootManager.ts @@ -0,0 +1,13 @@ +import { _decorator, Component, Node } from 'cc'; +import { EventEnum } from '../Enum'; +import EventManager from '../Global/EventManager'; +const { ccclass, property } = _decorator; + +@ccclass('ShootManager') +export class ShootManager extends Component { + fire() { + EventManager.Instance.emit(EventEnum.ShootBtnClick) + } + +} + diff --git a/client/assets/Scripts/UI/ShootManager.ts.meta b/client/assets/Scripts/UI/ShootManager.ts.meta new file mode 100644 index 0000000..343e627 --- /dev/null +++ b/client/assets/Scripts/UI/ShootManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "f4c4bbdf-77d3-44a3-88c2-29f40401dab7", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Utils.meta b/client/assets/Scripts/Utils.meta new file mode 100644 index 0000000..0824e4d --- /dev/null +++ b/client/assets/Scripts/Utils.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "f395bd07-24d1-424e-bf3c-3276de3d9d22", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Utils/index.ts b/client/assets/Scripts/Utils/index.ts new file mode 100644 index 0000000..4fb3b2c --- /dev/null +++ b/client/assets/Scripts/Utils/index.ts @@ -0,0 +1,20 @@ +import { Layers, SpriteFrame, Node, UITransform } from "cc" + +const INDEX_REG = /\((\d+)\)/ + +const getNumberWithinString = (str: string) => parseInt(str.match(INDEX_REG)?.[1] || '0') + +export const sortSpriteFrame = (spriteFrame: Array) => + spriteFrame.sort((a, b) => getNumberWithinString(a.name) - getNumberWithinString(b.name)) + +const getUIMaskNumber = () => 1 << Layers.nameToLayer('UI_2D') + +export const createUINode = (name: string = '') => { + const node = new Node(name) + node.layer = getUIMaskNumber() + const transform = node.addComponent(UITransform) + return node +} + +export const rad2Angle = (rad: number) => rad / Math.PI * 180 + diff --git a/client/assets/Scripts/Utils/index.ts.meta b/client/assets/Scripts/Utils/index.ts.meta new file mode 100644 index 0000000..6d5f3d3 --- /dev/null +++ b/client/assets/Scripts/Utils/index.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "2e280f2e-52a3-465a-acf5-fb412ef51d6b", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/resources.meta b/client/assets/resources.meta new file mode 100644 index 0000000..c90cefd --- /dev/null +++ b/client/assets/resources.meta @@ -0,0 +1,15 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "361398e8-25a2-4476-a5dd-833ff68e087b", + "files": [], + "subMetas": {}, + "userData": { + "isBundle": true, + "bundleName": "resources", + "priority": 8, + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/prefab.meta b/client/assets/resources/prefab.meta new file mode 100644 index 0000000..b9cbcdd --- /dev/null +++ b/client/assets/resources/prefab.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "35ebed99-20d7-4d22-b7af-28eeb7960a84", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/prefab/Bullet.prefab b/client/assets/resources/prefab/Bullet.prefab new file mode 100644 index 0000000..2a4c2aa --- /dev/null +++ b/client/assets/resources/prefab/Bullet.prefab @@ -0,0 +1,142 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "Bullet", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "Bullet", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + }, + { + "__id__": 4 + } + ], + "_prefab": { + "__id__": 6 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 110.951, + "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": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 3 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "607/QqeHhEZJSeteJoUog1" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 5 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "23c36f17-b533-41fc-ada4-4c3408ec5597@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f4rVayGkpKJq+xMADzqU5V" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "bblSIxXVJAw4TCQ+fTNSBM" + } +] \ No newline at end of file diff --git a/client/assets/resources/prefab/Bullet.prefab.meta b/client/assets/resources/prefab/Bullet.prefab.meta new file mode 100644 index 0000000..8a3b186 --- /dev/null +++ b/client/assets/resources/prefab/Bullet.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.39", + "importer": "prefab", + "imported": true, + "uuid": "099548f8-37b4-475d-86df-9ad4a5ecfd77", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "Bullet" + } +} diff --git a/client/assets/resources/prefab/Explosion.prefab b/client/assets/resources/prefab/Explosion.prefab new file mode 100644 index 0000000..8b24e75 --- /dev/null +++ b/client/assets/resources/prefab/Explosion.prefab @@ -0,0 +1,142 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "Explosion", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "Explosion", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + }, + { + "__id__": 4 + } + ], + "_prefab": { + "__id__": 6 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 110.951, + "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": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 3 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "607/QqeHhEZJSeteJoUog1" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 5 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f4rVayGkpKJq+xMADzqU5V" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "bblSIxXVJAw4TCQ+fTNSBM" + } +] \ No newline at end of file diff --git a/client/assets/resources/prefab/Explosion.prefab.meta b/client/assets/resources/prefab/Explosion.prefab.meta new file mode 100644 index 0000000..25a32b0 --- /dev/null +++ b/client/assets/resources/prefab/Explosion.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.39", + "importer": "prefab", + "imported": true, + "uuid": "147de574-5396-440e-af4f-e4af24888059", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "Explosion" + } +} diff --git a/client/assets/resources/prefab/JoyStick.prefab b/client/assets/resources/prefab/JoyStick.prefab new file mode 100644 index 0000000..fd10f3c --- /dev/null +++ b/client/assets/resources/prefab/JoyStick.prefab @@ -0,0 +1,580 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "JoyStick", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "JoyStick", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 22 + }, + { + "__id__": 24 + }, + { + "__id__": 26 + } + ], + "_prefab": { + "__id__": 28 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -480, + "y": -320, + "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": "" + }, + { + "__type__": "cc.Node", + "_name": "Body", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 11 + } + ], + "_active": true, + "_components": [ + { + "__id__": 17 + }, + { + "__id__": 19 + } + ], + "_prefab": { + "__id__": 21 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 150, + "y": 150, + "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": "" + }, + { + "__type__": "cc.Node", + "_name": "Base", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + }, + { + "__id__": 6 + }, + { + "__id__": 8 + } + ], + "_prefab": { + "__id__": 10 + }, + "_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": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 5 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 200 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "6ejPyOfqRE25w9zJbDGdh3" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 7 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 100 + }, + "_spriteFrame": { + "__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "396m9Nih1MWY7F/ybvFrtB" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 9 + }, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 256, + "_originalHeight": 256, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "8aBKAmKmJBXaZ2Dk38BikC" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "2cvfYjo35GkoZTmD0R1ZON" + }, + { + "__type__": "cc.Node", + "_name": "Stick", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 12 + }, + { + "__id__": 14 + } + ], + "_prefab": { + "__id__": 16 + }, + "_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": 0.3, + "y": 0.3, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "__prefab": { + "__id__": 13 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 256, + "height": 256 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "68QvW/9ZZAdJjB1N+Guag4" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "__prefab": { + "__id__": 15 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "0eWKGBz4ZAersuhv4N5kwz" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d4qE3f1kdGBLQFmhtG8C+3" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 18 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 200 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "e1c6xTNM1KiYCaRC1S5oje" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 20 + }, + "_alignFlags": 12, + "_target": null, + "_left": 50, + "_right": 0, + "_top": 0, + "_bottom": 50, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "e48MgFyt9PBKx5Ys0BJg4L" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "87eH76xUVLFb6r1A+7tq4F" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 23 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "205oXiJoZHkaJi8XBhtLEO" + }, + { + "__type__": "bfc9abjfs9EIq9cZwv/Tsko", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 25 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "20KqWYRFJKzoRcoD115OfT" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 27 + }, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 960, + "_originalHeight": 640, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "76WrdM2MBFXbRZNvn2wO8t" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "dcSQx/IBRN555vh0smiDUk" + } +] \ No newline at end of file diff --git a/client/assets/resources/prefab/JoyStick.prefab.meta b/client/assets/resources/prefab/JoyStick.prefab.meta new file mode 100644 index 0000000..9810dd3 --- /dev/null +++ b/client/assets/resources/prefab/JoyStick.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.39", + "importer": "prefab", + "imported": true, + "uuid": "230d01f4-702b-4295-b34c-d87e25305d63", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "JoyStick" + } +} diff --git a/client/assets/resources/prefab/Map1.prefab b/client/assets/resources/prefab/Map1.prefab new file mode 100644 index 0000000..e6cc4fb --- /dev/null +++ b/client/assets/resources/prefab/Map1.prefab @@ -0,0 +1,180 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "Map1", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "Map1", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + }, + { + "__id__": 4 + }, + { + "__id__": 6 + } + ], + "_prefab": { + "__id__": 8 + }, + "_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": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 3 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "7ckWiSysVO96kRBBg+KESt" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 5 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "155ebd7e-9357-4155-acfc-fb5438af3d48@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 2, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "26C4/mRGRLBr2jAzW8ztmg" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 7 + }, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 1000, + "_originalHeight": 1000, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ecteqJwWZC+a13hCI929/h" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "9dDZjW4/pG3qtXeK7m3DFi" + } +] \ No newline at end of file diff --git a/client/assets/resources/prefab/Map1.prefab.meta b/client/assets/resources/prefab/Map1.prefab.meta new file mode 100644 index 0000000..9a93cbb --- /dev/null +++ b/client/assets/resources/prefab/Map1.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.39", + "importer": "prefab", + "imported": true, + "uuid": "ab1c7b4f-35ac-4610-98a9-ea4b5b8170f8", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "Map1" + } +} diff --git a/client/assets/resources/prefab/Player.prefab b/client/assets/resources/prefab/Player.prefab new file mode 100644 index 0000000..dce2fd4 --- /dev/null +++ b/client/assets/resources/prefab/Player.prefab @@ -0,0 +1,690 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "Player", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "Player", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 18 + }, + { + "__id__": 22 + } + ], + "_active": true, + "_components": [ + { + "__id__": 28 + }, + { + "__id__": 30 + } + ], + "_prefab": { + "__id__": 32 + }, + "_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": "" + }, + { + "__type__": "cc.Node", + "_name": "HP", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + } + ], + "_active": true, + "_components": [ + { + "__id__": 11 + }, + { + "__id__": 13 + }, + { + "__id__": 15 + } + ], + "_prefab": { + "__id__": 17 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 70, + "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": "" + }, + { + "__type__": "cc.Node", + "_name": "Bar", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + }, + { + "__id__": 6 + }, + { + "__id__": 8 + } + ], + "_prefab": { + "__id__": 10 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -50, + "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": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 5 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 15 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "6eSfVOfMxPjb1oQVZ1z5hY" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 7 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 0, + "b": 0, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "24a704da-2867-446d-8d1a-5e920c75e09d@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 1, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "267GXyiYJB6qxCg6pLEfLQ" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 9 + }, + "_alignFlags": 8, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "160ZgDPIFBEZ5Msv1mYMvN" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "35OAlXyaBOBpLPAOKsDZHk" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 12 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 15 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ca65l+rt9Iz5il0zQDlfgE" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 14 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "9fd900dd-221b-4f89-8f2c-fba34243c835@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 1, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "796J69Ia1LgrmmxsVBavZU" + }, + { + "__type__": "cc.ProgressBar", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 16 + }, + "_barSprite": { + "__id__": 6 + }, + "_mode": 0, + "_totalLength": 100, + "_progress": 1, + "_reverse": false, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "d2mnLSm7RHF7V3bD57PvC5" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "29DaYGvxpFo5cOAmvhl1Uj" + }, + { + "__type__": "cc.Node", + "_name": "Nickname", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 19 + } + ], + "_prefab": { + "__id__": 21 + }, + "_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": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 18 + }, + "_enabled": true, + "__prefab": { + "__id__": 20 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "8blUJZ4nJKpKsLO2YpEChI" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "5adoggTLFPToeEZEIA7Yh3" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 23 + }, + { + "__id__": 25 + } + ], + "_prefab": { + "__id__": 27 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 98.845, + "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": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 22 + }, + "_enabled": true, + "__prefab": { + "__id__": 24 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 110.72, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2a/IDEWZRPcb6AKU5/XAlD" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 22 + }, + "_enabled": true, + "__prefab": { + "__id__": 26 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "nickname", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 24, + "_fontSize": 24, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": true, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "71ZjYMvjBES7FqZGSo1L00" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "03OAmogbVI5qDqTUJvplOC" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 29 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "43sIN2Al5OsJRxFqY+HJTV" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 31 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "f0f5e564-2d98-4de1-bb92-794eeb1acffc@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "48V6DZW5BPxIbiTPVjSL37" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "60xKi1fHZAl6spWUrSZzlZ" + } +] \ No newline at end of file diff --git a/client/assets/resources/prefab/Player.prefab.meta b/client/assets/resources/prefab/Player.prefab.meta new file mode 100644 index 0000000..841cff6 --- /dev/null +++ b/client/assets/resources/prefab/Player.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.39", + "importer": "prefab", + "imported": true, + "uuid": "d565d84f-56c4-4aa3-831c-99db0a0d2390", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "Player" + } +} diff --git a/client/assets/resources/prefab/Shoot.prefab b/client/assets/resources/prefab/Shoot.prefab new file mode 100644 index 0000000..7351885 --- /dev/null +++ b/client/assets/resources/prefab/Shoot.prefab @@ -0,0 +1,275 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "Shoot", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "Shoot", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + }, + { + "__id__": 4 + }, + { + "__id__": 6 + }, + { + "__id__": 8 + }, + { + "__id__": 11 + } + ], + "_prefab": { + "__id__": 13 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 330, + "y": -170, + "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": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 3 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 200 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "3ayBLC6LxFz7oq0ZzKG3NX" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 5 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 100 + }, + "_spriteFrame": { + "__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "63G/jWiFtOYLM6CEMTwaZ5" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 7 + }, + "_alignFlags": 36, + "_target": null, + "_left": 0, + "_right": 50, + "_top": 0, + "_bottom": 50, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c6JBLKH2tKrZRkvm2uowFn" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 9 + }, + "clickEvents": [ + { + "__id__": 10 + } + ], + "_interactable": true, + "_transition": 3, + "_normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": { + "__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_hoverSprite": null, + "_pressedSprite": null, + "_disabledSprite": null, + "_duration": 0.1, + "_zoomScale": 0.9, + "_target": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a6u7mmf6RAVatiJ06E5rQC" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "f4c4bvfd9NEo4jCKfQEAdq3", + "handler": "fire", + "customEventData": "" + }, + { + "__type__": "f4c4bvfd9NEo4jCKfQEAdq3", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 12 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "38y7yDAz5Eko6zTvyWDBpA" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "a02fCGCDhFvIHiQOXl0NzD" + } +] \ No newline at end of file diff --git a/client/assets/resources/prefab/Shoot.prefab.meta b/client/assets/resources/prefab/Shoot.prefab.meta new file mode 100644 index 0000000..e62fc84 --- /dev/null +++ b/client/assets/resources/prefab/Shoot.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.39", + "importer": "prefab", + "imported": true, + "uuid": "3f74a43c-479b-49f2-b883-2caca4f6682c", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "Shoot" + } +} diff --git a/client/assets/resources/prefab/Weapon1.prefab b/client/assets/resources/prefab/Weapon1.prefab new file mode 100644 index 0000000..c06be46 --- /dev/null +++ b/client/assets/resources/prefab/Weapon1.prefab @@ -0,0 +1,400 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "Weapon1", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "Weapon1", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 16 + } + ], + "_prefab": { + "__id__": 18 + }, + "_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": "" + }, + { + "__type__": "cc.Node", + "_name": "Body", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + } + ], + "_active": true, + "_components": [ + { + "__id__": 11 + }, + { + "__id__": 13 + } + ], + "_prefab": { + "__id__": 15 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 40, + "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": "" + }, + { + "__type__": "cc.Node", + "_name": "Anchor", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 4 + } + ], + "_active": true, + "_components": [ + { + "__id__": 8 + } + ], + "_prefab": { + "__id__": 10 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 5, + "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": "" + }, + { + "__type__": "cc.Node", + "_name": "Point", + "_objFlags": 0, + "_parent": { + "__id__": 3 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 5 + } + ], + "_prefab": { + "__id__": 7 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 50, + "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": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 4 + }, + "_enabled": true, + "__prefab": { + "__id__": 6 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "16I8wkBTxHDYkTYgfJ//ui" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "bcdHkpaU9MH4VKR4D058ND" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 9 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "60vCWjti5CdYgFsCeZ6W60" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "51ov0p6adLqbnI7tTBZry9" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 12 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 150, + "height": 150 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "0128A1bzNNoZ3uKCYWPXCq" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 14 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "f815a77d-5654-4a6a-86ef-be8f1efaa95e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "40OLWmzWlLCZT0MjYrvahg" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "55aZ32uotKq7UKJdoxzmU6" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 17 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "30Yu+lKAtH7JhdCwKmj4Uz" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "b4iDImIiJBr625hlJDYo2e" + } +] \ No newline at end of file diff --git a/client/assets/resources/prefab/Weapon1.prefab.meta b/client/assets/resources/prefab/Weapon1.prefab.meta new file mode 100644 index 0000000..02267af --- /dev/null +++ b/client/assets/resources/prefab/Weapon1.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.39", + "importer": "prefab", + "imported": true, + "uuid": "0e6f92c7-02b3-408b-b756-2e0b4d4da977", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "Weapon1" + } +} diff --git a/client/assets/resources/prefab/Weapon2.prefab b/client/assets/resources/prefab/Weapon2.prefab new file mode 100644 index 0000000..244d916 --- /dev/null +++ b/client/assets/resources/prefab/Weapon2.prefab @@ -0,0 +1,400 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "Weapon2", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "Weapon2", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 16 + } + ], + "_prefab": { + "__id__": 18 + }, + "_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": "" + }, + { + "__type__": "cc.Node", + "_name": "Body", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + } + ], + "_active": true, + "_components": [ + { + "__id__": 11 + }, + { + "__id__": 13 + } + ], + "_prefab": { + "__id__": 15 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 50, + "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": "" + }, + { + "__type__": "cc.Node", + "_name": "Anchor", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 4 + } + ], + "_active": true, + "_components": [ + { + "__id__": 8 + } + ], + "_prefab": { + "__id__": 10 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 5, + "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": "" + }, + { + "__type__": "cc.Node", + "_name": "Point", + "_objFlags": 0, + "_parent": { + "__id__": 3 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 5 + } + ], + "_prefab": { + "__id__": 7 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 70, + "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": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 4 + }, + "_enabled": true, + "__prefab": { + "__id__": 6 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "7dUANOplxJlIsLcYO75CnZ" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "0eEUTI0i9ANLweIrxmY6dW" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 9 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "16I8wkBTxHDYkTYgfJ//ui" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "bcdHkpaU9MH4VKR4D058ND" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 12 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 150, + "height": 150 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "0128A1bzNNoZ3uKCYWPXCq" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 14 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "d6c248fd-c31d-475f-948a-be099aca55d3@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "40OLWmzWlLCZT0MjYrvahg" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "55aZ32uotKq7UKJdoxzmU6" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 17 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "30Yu+lKAtH7JhdCwKmj4Uz" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "b4iDImIiJBr625hlJDYo2e" + } +] \ No newline at end of file diff --git a/client/assets/resources/prefab/Weapon2.prefab.meta b/client/assets/resources/prefab/Weapon2.prefab.meta new file mode 100644 index 0000000..c822d3d --- /dev/null +++ b/client/assets/resources/prefab/Weapon2.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.39", + "importer": "prefab", + "imported": true, + "uuid": "e3554735-cb19-40d0-b167-0c607ce94392", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "Weapon2" + } +} diff --git a/client/assets/resources/texture.meta b/client/assets/resources/texture.meta new file mode 100644 index 0000000..b17038d --- /dev/null +++ b/client/assets/resources/texture.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "d7f1d6a2-3440-4dbb-aab0-6217739e019d", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/bg.meta b/client/assets/resources/texture/bg.meta new file mode 100644 index 0000000..1ee1ce8 --- /dev/null +++ b/client/assets/resources/texture/bg.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "36488b93-05fd-4191-af7b-297d24da5847", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/bg/tile.png b/client/assets/resources/texture/bg/tile.png new file mode 100644 index 0000000000000000000000000000000000000000..796e59b769da8bcea6bec77f214012c3d23031bf GIT binary patch literal 2164 zcmZvedpr|*AIE=d%suR^$GxVdI6^vhSi;=cZ6mU*< zp5mLlQ_?W;*>8DjM0`PFJsoX8+nDB}xRE$(?P?7`N4}ikl%%+qAv*cT0Qto=!5UrFozQ`a?h6fe75Eph;W(RR7 zNZoj|<+Jg(1PLcSw~~+t8fjlGlU~OZF2#Ki2<8+;mKg3hi}j>P$epGMlg4NQPCqwj zb&(qr>bw>~r8PrRx4z^zwm;qcj5(C(U&znv*Xa9UyU`?m85;J+nU$C5P+9EM{Zml0 zZeJH@+IZE6zeZ-- z2YYQ?Tzj3sayOPFZfZI`T&I*xGDRON+G)4OfRx3IE9COinets@_~SHTLl@XvlU3`{ z${y6$UmSOXD7j!>xwW*>lC*$=@)AUINg=Myr+stb%M153T8gNWTfNreXHWB2a-wJl zxCl;+)`l9uoRs;%rblu?ySU{}=YtnZtXDT^q}Ht&U0N!VP@q zNEsik@~B}d+a=22e93yWGzlZ)q!4jj`jNR5C79Qn13^+qw~4vZJ-4eJY|Hnw-8`g; zGT~XtgAy;p*93yufoX2WB&KKrkH$7Kug#%4n9Ir9O;e2KNn4TUCs0^?y-(kV->Z&w z=%y07OyI=|?5&yNMhBWSsi_KLcInu-gZD8c_`80Fs~}# z`lni|=(E(@$_M+xV#kW_X|z<+j!73muE;z1$Ue1cX|TdbVh_(dVK#dN>YQKbpT;`x zu(_*I1u1ol=z^T<7Ql~}!Spr1^5&S(nV)kB+ug$)Msvsd?(!>CC`dP$jke85RZ$>$ zZ#d&;ezUw1$s~sChd9x%-DdBflAWt?Mb!{}qN7&$Gqi6oh(OpqV60z~A8x;GZwxTM za)iNtVy0c>@>%zkA&p_@9fZXF&|>&$=;&r&0yE7RRLWjnBjrwLs`jVUeQpxLq1BY4 zk)y)4Ox6qY$8Gm>X;HHq--fnS<1X!4ui6F`vEQN5WAEUCXNv7IQ7ii?N_pdh_BO-Ax6E$JxBL?sqk&QnE^j) zX_|+|!_25*jV4NWli17~i-PjKTD@tEBXTXgE+$nhdzo1Fq8-^cp`&Wp*v(>5^B;7_ zg+s)4{J$Fgr3>@Y9dsjsoK0RNE=O2+?9nfvQa#p6^>=WsK`nWK%ZnGOFDQ>33z#vF zA73*j*qHEk<~5h9#SR;J2frYmpXn3H6=^gg@0_Gjh(9jvf-KqZ<@F2U@!O0~fRK$> zWaDG1V>^>2EnP~Yy*mWt&a0^pkOdO94~sX;O6_R@@&)_XAsHmO2 zGWB&&hqiKm{U3Thlc8rocd48LBi-z``BjgWCYmk``QjPf{QiAmpfPrM#gU+xQ0I>m z4FYMm(|w-1VnB1!Sh-kad9ri=>|?PyQqNaDAkCL(1E2{x|9EumADi39`#V>Ujt86P4l;c1!dwC8$8L67$DrRh3B=)_GYb z`a$~cW)6gZ z+IQ)ootNmH;yuh+tGz@=T2+tSjX+Y%+?i^tyn> zK>5jaUo|9$@Bwt_mS))o<=p?Sq^1Ek4mwvVHu)rsoYONgp_v`wW4LedDnBP2kfMjS zd+&*v#z4^hRo@Ft3vaHA5wh)IhjoTvrQgz*o5bO5wr4kYUbO~uBx}Rrorg#VhLzMS zIU@*`qvaq`4uXgRtbF@&0!zdj{;2{@!O;zbFawbFy0=5eUyyjEdjqXAJY5_^BHWWx zBoYo-9QbD3W0hdS;^qt?GTIOPwrTvoV3$k5CH76WPTSljJgr}?7%Ew;{j*QuG^4@k z)}!~DWj}nIs&KPUViq66&nkz-4A(j&FSvNDohA~Q*$_3Y`HW=gfeenGHVDzs&cM*T XR!#BAeAaV7>lr*<{an^LB{Ts5T0lbT literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/bullet/bullet1/bullet1 (1).png.meta b/client/assets/resources/texture/bullet/bullet1/bullet1 (1).png.meta new file mode 100644 index 0000000..59847a9 --- /dev/null +++ b/client/assets/resources/texture/bullet/bullet1/bullet1 (1).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "23c36f17-b533-41fc-ada4-4c3408ec5597", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "23c36f17-b533-41fc-ada4-4c3408ec5597@6c48a", + "displayName": "bullet1 (1)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "23c36f17-b533-41fc-ada4-4c3408ec5597", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "23c36f17-b533-41fc-ada4-4c3408ec5597@f9941", + "displayName": "bullet1 (1)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "23c36f17-b533-41fc-ada4-4c3408ec5597@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "23c36f17-b533-41fc-ada4-4c3408ec5597@f9941" + } +} diff --git a/client/assets/resources/texture/bullet/bullet2.meta b/client/assets/resources/texture/bullet/bullet2.meta new file mode 100644 index 0000000..2c0b2f2 --- /dev/null +++ b/client/assets/resources/texture/bullet/bullet2.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "7bc2b36a-1f9e-4c27-b679-7f78f1b9d8ed", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/bullet/bullet2/bullet2 (1).png b/client/assets/resources/texture/bullet/bullet2/bullet2 (1).png new file mode 100644 index 0000000000000000000000000000000000000000..a59c4436f862397bbe5cdeb883c3adb455b6497f GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}iJmTwArbD$ zDG~_>EDn4#?y*WRVR3VY5glBO|L1%Cm+!rIC?WPp_wIK^7M)7RPn__Wa??dq=@g^F z>xnXs_3RgnSTb&=DQI!I$r?y8EmnjPhpku`+|P?D9=!a@9%vbZr>mdKI;Vst0HZB5 AIsgCw literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/bullet/bullet2/bullet2 (1).png.meta b/client/assets/resources/texture/bullet/bullet2/bullet2 (1).png.meta new file mode 100644 index 0000000..0022781 --- /dev/null +++ b/client/assets/resources/texture/bullet/bullet2/bullet2 (1).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "c15456b3-2df6-44f1-bb74-5fec2d554675", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "c15456b3-2df6-44f1-bb74-5fec2d554675@6c48a", + "displayName": "bullet2 (1)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "c15456b3-2df6-44f1-bb74-5fec2d554675", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "c15456b3-2df6-44f1-bb74-5fec2d554675@f9941", + "displayName": "bullet2 (1)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "c15456b3-2df6-44f1-bb74-5fec2d554675@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "c15456b3-2df6-44f1-bb74-5fec2d554675@f9941" + } +} diff --git a/client/assets/resources/texture/explosion.meta b/client/assets/resources/texture/explosion.meta new file mode 100644 index 0000000..c3f9b7c --- /dev/null +++ b/client/assets/resources/texture/explosion.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "fe6330d8-92bb-4d96-a162-30010e542247", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/explosion/explosion (1).png b/client/assets/resources/texture/explosion/explosion (1).png new file mode 100644 index 0000000000000000000000000000000000000000..bf6242eab76e2e161a4018cf46bda3b00ee31807 GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=ffJTu&Frkcif|)4cf(C~&wO{e6Gt zyIn!n%u+s9`MqZ*AMww2>e!z=(e>TC!)a+H_E`sYER>nV7d>3V5^|)?SZF@$#e$GU z>9gJ^WKO^PS9;S7r=Kh;0eTCPEB^aROug|-Y=e+{oU@C{CwT#bP0l+XkKII=w~ literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/explosion/explosion (1).png.meta b/client/assets/resources/texture/explosion/explosion (1).png.meta new file mode 100644 index 0000000..9dd2b97 --- /dev/null +++ b/client/assets/resources/texture/explosion/explosion (1).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f@6c48a", + "displayName": "explosion (1)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f@f9941", + "displayName": "explosion (1)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f@f9941" + } +} diff --git a/client/assets/resources/texture/explosion/explosion (2).png b/client/assets/resources/texture/explosion/explosion (2).png new file mode 100644 index 0000000000000000000000000000000000000000..07d649c7031712dcd32a2a36ffbabbc4b250a0cb GIT binary patch literal 154 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=ffJL{AsTkcif|Qv>-J1bCba|63O` zT`ZgI`sMHXT9q}X$!Fe|6y~Kp-N?K<$#S}&!|9bdAq~3ip9LAW%Dj>|_`zVgbjQ4Z zH-hV!#Wch}7}q>f4^a&&XVflCl~z*9nrFDIk5x{GTOu#LLKtWngQu&X%Q~loCIFr` BGr9l( literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/explosion/explosion (2).png.meta b/client/assets/resources/texture/explosion/explosion (2).png.meta new file mode 100644 index 0000000..bff850c --- /dev/null +++ b/client/assets/resources/texture/explosion/explosion (2).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "0d43b4ea-a63d-4ebd-a25b-a93f85f86af4", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "0d43b4ea-a63d-4ebd-a25b-a93f85f86af4@6c48a", + "displayName": "explosion (2)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "0d43b4ea-a63d-4ebd-a25b-a93f85f86af4", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "0d43b4ea-a63d-4ebd-a25b-a93f85f86af4@f9941", + "displayName": "explosion (2)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "0d43b4ea-a63d-4ebd-a25b-a93f85f86af4@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "0d43b4ea-a63d-4ebd-a25b-a93f85f86af4@f9941" + } +} diff --git a/client/assets/resources/texture/explosion/explosion (3).png b/client/assets/resources/texture/explosion/explosion (3).png new file mode 100644 index 0000000000000000000000000000000000000000..ebf7874519a97cd2cc0aa5af085b2a23ab02d3f4 GIT binary patch literal 334 zcmV-U0kQsxP);~5@LhCS){wL0Uw6o(+#={i}3CSh*$ckTvWQVF_F z@`{qhL4$|AfO`?N=u&Wn7!9VLiliZNe?Qz$EMO5TJ+&O_k5C9DYJ!^ts030YP~8V= gf|~_ugI=79FBlzxG>U8Rq5uE@07*qoM6N<$f}`Y(l>h($ literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/explosion/explosion (3).png.meta b/client/assets/resources/texture/explosion/explosion (3).png.meta new file mode 100644 index 0000000..849e283 --- /dev/null +++ b/client/assets/resources/texture/explosion/explosion (3).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "69cdfa26-ab4f-4836-a719-5cbfdd4ce626", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "69cdfa26-ab4f-4836-a719-5cbfdd4ce626@6c48a", + "displayName": "explosion (3)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "69cdfa26-ab4f-4836-a719-5cbfdd4ce626", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "69cdfa26-ab4f-4836-a719-5cbfdd4ce626@f9941", + "displayName": "explosion (3)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "69cdfa26-ab4f-4836-a719-5cbfdd4ce626@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "69cdfa26-ab4f-4836-a719-5cbfdd4ce626@f9941" + } +} diff --git a/client/assets/resources/texture/explosion/explosion (4).png b/client/assets/resources/texture/explosion/explosion (4).png new file mode 100644 index 0000000000000000000000000000000000000000..163e4d6632eef092a3beacad9925d7b6fe9cf900 GIT binary patch literal 382 zcmV-^0fGLBP)!OIW09+A}ao&W9_$bm=07;n)%tp@fDHz#YKZb&rvu>mJn% zCpK*m%!arO#1##M9Q^Nj;{Tuh2O%D2ATkkR^9`~Xp)`ODm?Y;j!Yn7s0r-NFP%vM* zbdg|)5FG`CEFu@+&4#dI7?)2;$&R?PB2EY3vK*Ih$t{lYrU62Uk66p`fdMayaXNsQ z#smxylL&Fuh8Vfv-}A)($i*=_$ScamDTl4@z*iMx09rT6@it6pZ8^Q|p}ivpyq!NN cf|42l0RE(-d#6$Q^Z)<=07*qoM6N<$g5d$86aWAK literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/explosion/explosion (4).png.meta b/client/assets/resources/texture/explosion/explosion (4).png.meta new file mode 100644 index 0000000..fb8c7bf --- /dev/null +++ b/client/assets/resources/texture/explosion/explosion (4).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "d0e55505-9d16-4c58-8769-69427fb8c951", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "d0e55505-9d16-4c58-8769-69427fb8c951@6c48a", + "displayName": "explosion (4)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "d0e55505-9d16-4c58-8769-69427fb8c951", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "d0e55505-9d16-4c58-8769-69427fb8c951@f9941", + "displayName": "explosion (4)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "d0e55505-9d16-4c58-8769-69427fb8c951@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "d0e55505-9d16-4c58-8769-69427fb8c951@f9941" + } +} diff --git a/client/assets/resources/texture/explosion/explosion (5).png b/client/assets/resources/texture/explosion/explosion (5).png new file mode 100644 index 0000000000000000000000000000000000000000..559af5af1c02a367484b31c206d5504078eae5df GIT binary patch literal 343 zcmV-d0jU0oP)uFEJn%BnAc^(SZSprRvZxkq7h}jOkEWih>;{X^KkQn-C7ZvwaC5 z#2*HhKG(bB*-G>u--|3&qH&l|Gqzphl?Bu9Y3tdgq` z>zoPbx>uX*Dq!9q0?4E+gb+{vz&%bV+X1YFQWh)I0Xe|e1JUPzNnl>XR^>+Uk^pSW zVSC<3M6#`7`@j_D8i!K=Wj=tJxGHOHllzDuM-ckrp~$&dkO#~}c17HopG1HQu}5!| p2V7(!A2OeVpZvMlf6=KbcmSCJqmhpE>yiKf002ovPDHLkV1i^%jjjLy literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/explosion/explosion (5).png.meta b/client/assets/resources/texture/explosion/explosion (5).png.meta new file mode 100644 index 0000000..f54e397 --- /dev/null +++ b/client/assets/resources/texture/explosion/explosion (5).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "facbf03e-9de3-43de-a995-1888b494e0b9", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "facbf03e-9de3-43de-a995-1888b494e0b9@6c48a", + "displayName": "explosion (5)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "facbf03e-9de3-43de-a995-1888b494e0b9", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "facbf03e-9de3-43de-a995-1888b494e0b9@f9941", + "displayName": "explosion (5)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "facbf03e-9de3-43de-a995-1888b494e0b9@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "facbf03e-9de3-43de-a995-1888b494e0b9@f9941" + } +} diff --git a/client/assets/resources/texture/explosion/explosion (6).png b/client/assets/resources/texture/explosion/explosion (6).png new file mode 100644 index 0000000000000000000000000000000000000000..52926d049e2a54620780980b2586dc7d4f0ec032 GIT binary patch literal 217 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=ffJ1)eUBArY-_r`d8f81S^l+Xn2N z)Vza(Pwt3g!9>2elW`vEu3o{5f@Es$Uz@aNiTwn20Vlg-PXuJ!Gr7O-+ShwcNP0(? z$H`ldH0L@gPZHw&Sa-GU6z?9v($hIfAN%JY_$`_@bMqfjCk{oH6Db~iuU6e$qkFzI zM@db(!dUR|qafi$@;hb;WP4u;U2LZ6-p4jok+I-6+o8#2wb}0?tUt+@E!}LpY+n23 R>p-_Mc)I$ztaD0e0su0fQ~Ce^ literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/explosion/explosion (6).png.meta b/client/assets/resources/texture/explosion/explosion (6).png.meta new file mode 100644 index 0000000..04e4758 --- /dev/null +++ b/client/assets/resources/texture/explosion/explosion (6).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "f325e61c-afa9-4bed-a69d-bd8835d78629", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "f325e61c-afa9-4bed-a69d-bd8835d78629@6c48a", + "displayName": "explosion (6)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "f325e61c-afa9-4bed-a69d-bd8835d78629", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "f325e61c-afa9-4bed-a69d-bd8835d78629@f9941", + "displayName": "explosion (6)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "f325e61c-afa9-4bed-a69d-bd8835d78629@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "f325e61c-afa9-4bed-a69d-bd8835d78629@f9941" + } +} diff --git a/client/assets/resources/texture/explosion/explosion (7).png b/client/assets/resources/texture/explosion/explosion (7).png new file mode 100644 index 0000000000000000000000000000000000000000..12a4002ca350725fe7d5040d50cd5a9f90d9584a GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzOHUWakcif|*A)2}6nIz;{)<=e z_;oL7B8NiDnIGTYxH0U1t-E^rn(B7zy0mdKI;Vst04^IPAOHXW literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/explosion/explosion (7).png.meta b/client/assets/resources/texture/explosion/explosion (7).png.meta new file mode 100644 index 0000000..a99722a --- /dev/null +++ b/client/assets/resources/texture/explosion/explosion (7).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "22cdc5d6-72e9-4c27-aaab-d8702321c131", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "22cdc5d6-72e9-4c27-aaab-d8702321c131@6c48a", + "displayName": "explosion (7)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "22cdc5d6-72e9-4c27-aaab-d8702321c131", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "22cdc5d6-72e9-4c27-aaab-d8702321c131@f9941", + "displayName": "explosion (7)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "22cdc5d6-72e9-4c27-aaab-d8702321c131@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "22cdc5d6-72e9-4c27-aaab-d8702321c131@f9941" + } +} diff --git a/client/assets/resources/texture/joystick.meta b/client/assets/resources/texture/joystick.meta new file mode 100644 index 0000000..171643c --- /dev/null +++ b/client/assets/resources/texture/joystick.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "b2041c87-dac4-445e-a3ac-e6689804c3b4", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/joystick/circle.png b/client/assets/resources/texture/joystick/circle.png new file mode 100644 index 0000000000000000000000000000000000000000..d5bad8deae01f1f9afdadf9620231aac12261d54 GIT binary patch literal 5280 zcmaJ_c~leE+nyn8vV$V45+M;#NC+e>DNB$wtP!lB1qviV!j=euu!sb-paOycM4++= z2&hQWin0k-35}>gSd0jQ6=jQ{$YR+1LVs<4-ydJUIdjh3nfpA?``q_^@0>Gpp5Wmm zE2S<40Dvss+1?8PK;aMsB*ldnzv$W!;YE$^;7j+WhR_*7(PY4uL=7fG@sU9%$X?_i zQo>0N*%AOCI+P>6bYFKjERh<8QSVJx2u|k1JGCc?y9~lu9gN?V+{!3*$Nr<8c#T!P&==`lL5h^v}?<^8RsdQ>gD3t~^7FvSp`B0)rR7Q;cp9FVzEIulR9u!3+epcg|CQ zuce6B8TgBg6gheiU2A5(D}s~6VvLnxWI%PC^N6cQ{)TV#jgn9M2K>|U2&${8v3)4; za7JHkKKf3h#M@sET9tpjK8YzL=bshNJ!%D;!XxrEbvXnUDWBUg55si-Ve4MWe{4C6>%UTx&>&&so$FBXAZ5ho~*!7E`t z>Pf|Np9coAJY7mJ-zwKcGtH+H1R5|E{0QNqJx@E~@M3x6%RNkS1%dH5G>4jPm7FnI zY>4r1&AOGM$tccvs3@9w zXvuH07gh7j@9+ z%w{!LAQS9{4lm}C_UGB~l*^*lGsb)a#T1_Q8Z?jcbe{MZNf@o*of5B4sqN&|J?>M- zQ8}s{{j3BuZo$5d%`=hUi^NwI%ze6Bv=N&2=0^QX`BBnFvYspLAYgT);bo?L$f-)v zHPyQ}VFSm&s?`&%L%b9HD8bHY~U)LnEnjz%qy1B3<6ln>d^yCxhJZ zk1oQ$4e#ahfTe`>2A6c>`CMp=EA1lw)w(oy7+4w}dzqd59U>RK7B^XTW!G5n&)1U+ z^Rkk?W%9J}Lp|C3d7(f**NHX<(KPSKshXQ)&vv1ip?=|f$esjo8}7Aijk_l=RiOErh(~goywkd38kSgQguW~uSoQ?_ zhE}Q-^h(=efai2c;x({T@OlBiLb8P7!r_mzl6NK0WCOK08S|ddBd&0#RvV&E{Qz^# z?OqB>koqxZLe{%_O6F)KINd5(n&_^GNDAz}{mIwNtc?mJUh1`ohzZoi>IQcZ^yZ1c znoCG>xkSx6(?8N=B~|-fas;pz@+L=ibqV5r%ur4H*yI3$xpzXfds0GbcJhNuQkiz=fcv#|rW_@e~+HDkVT=2!GBfZn_)nx}QnE!?c; zcy$Fh3RQb%3eo=Y`|&GF{(#kN!>Z|hViI`iCT3-Si)Y>gk-qPW*hYfX3zVr3zL_vn z=3%z=8)@A8=}e~v=MevC+|+vr-duj%bq@0fUv$-Og#hlhuBR_JiL+rgYH;E?9;ZV|-bex%YFK zp~blt$oa-jOj>xCr z&C;};7;&YKW(6Z+eP6N%YLU6|YxcKi4mSX|Yi{EX?6UI7^arOuX1Ky4YYlVbe}Jvy z!>%0%vw{~Pb^Yw;ubhtpiL=y)jZsW!zaq?--`;)hkBl4mFY z?m^tMWxj1^9BVo18^9c2!Uam;Bjd#S$~f|(c2kKRqyEe@bvqRDx0+?kZI*#FW9WTw z>H1zAA#uu-38|A%$p47kcwQ>ztMe+a7O1m4abf&d~^z`qWn5Cxfb-ou2(4vPOG5euaK zT4Ty=67slFBS2iG94>bx3^L&l;I15>8DlOBC%n^@05q_DR$!Rf`9kFV5#ZrAvMCJ0 za}!EMa>ai+j|FT;ZpjAj*_J%2(U~|4h*Hj&GBMlI>gs^P?V%CiC_(7w;63nGl^pJY zY@o$9)=#6;M~Jx(8dL}+FMmp;LH(}YsR3VlNkjD##Xc4DzW~;i!hAIK3L+rB&Q{EF zgJ+RIX03$6yi_1!J7c={!DoLWzHzB<1El+2@Ls3=;HA=;6w8uhjqs()kKSRn0Jgr< zA2vL4#L7JUnNa?fIWz#Z98eDfyz8VD&gR@npsws4T3)A@r{^i;f%Ql?;; zsSXAd7krbp9_W;CFZW;;Ze9I`6h?bjw{xP}Z1J1J777@0T+AjhX2s&|JU3$tA`rid z@U)BE+JOeQ7iAmS7^e8DGEg=0Bz=o)*9wGbaSGSQ>ojr`v7FUB1H(A6axL?pTEKuS z+`dWb4Y0PbPGjPyli8aY>^N{x9-jG17VzrWSbz(z4JtFY`#4h((n!Ak1JH z;#JSF7#&0~XAO?+r?~D(9ef3w(LeV6ycF(Rw@a9l$oc~bnA3;4|pmUZwR+!zO{bndEu@TaW-wQ@I-DJ zex*0KT`D7#?OL*o74v$V;5}KndBGp7-M4@0ClNp?{1^R2_aBRttY^B@yVD_fGfw`e z;tsd-WgFJB(y);;)u(9st-x!WH$1bCI~A z-=7rE)&C+rtI~2t_%fv>S>$zC9Arj(xw2oNxGZraVPuQlV?dgyEo8?TwP2 zs~gWF0hb@4zxCLs&c;7SFaDNe9tYkLS5KM=I@lzkP+}N0Zy51Hmt+4ad%7Ss=Z+QA z*J^Z>qctRji$$;OfQ|7GxUPEi%C3!;52vrW*^l?BbLt~hpu6uoq6C$GV8k~+76bN} zXN~J>gIjdv$3IWel*P^XrzPTYoif1wn+2K&1n3){SI&Rc`1xRS;YZOUPp%&J*mAiA zWUYT}@RY}%{U~Pd=re5RUR1cjz9&LRJiREzVMLffm9R4n7ZMkJgw5h9b6*B>xW5@) zuT=IxsTDYuNS;_{>AX6Pdv)FAV*L~9Hy1Nts5|zyT!d3OX%3!IB6<63W|9ijHODug zJ5KcJVvmc*mbp4J(PPo42~J?0fb||-%RG{(0=?Nj3E>1q_>@DFfA2=IvLB*>q1U`Q z2(~df)v?}m1#>F%kFUW+swqaBsR-2b_{1F(&5=s}Tp8dhHd!3?d58-I`JG~gt#-`Gl?C1q-?-@PGl zCn*smt#*Hk!S5l8q}Ij|x1NWk=oFpZHJQM{?Ej!sj#D0NZQMGg^svY+P3lYjWFlL_ zlF_a)moEOx%?#Lml;cF*>rquRG?P81)128T(mVQ|-BbbYy1wvT#~BpFbM!5n{>PCo zhsuLTi=W)yk^g}2$yfDAgb>#3E1ZigtvPQT zW;No!ISz1v{D<-%$;5Gc8CZe!?=fddUg{5Dp)mjkx7b2TVXG;HHaEUp@$~F5`?+az z)`C?D*Fp{F8kxYHswj&!jUcI&k7rvS5p@5OQGSn#WO~U%=&c8_Z>^j-yT=zFyCM!(sfKlQ%x4jJy4ar3*Ww+N+lu zz>BGF%(=aKRFc7)5!Vdk*LU5^3g1PTV?R}V=($BW3N)`dvsIJe`*IfyiCR1XMbCy7 zy2_hNA8M5net15Q&-ijrV`t4-w7|{}oaDZ~@C_=s_tpYZ!7YrjjNrd-vn|ESHG`A$ zyGN<~p&g&?#>GM-?&B78&ApBDqT{L8Uk^{ETMH<_cO`**{l}MNWT+aO z@F)$>a!tMny1Jmz=kyFJ?M=SU&~Dc)Si%TTItd5St5ck&W|zP>^_^}^|G?17x9omW z1KKyf+KY+5;ZEzPN2s}1wsS+srpo!F{Iiun6-@JSGo zNVOT3c3vY~ywL|q@_ewluKv^(QtKiM*Huq?_q%{KriXWkG+jaYVLy+D6nR3NSua@9 zWAl$bvo7bulww({Fl0;h)&ZA85a*V?Q4Zy@Z&e>-RI0g*xy^3(_+*{I=nzqGLUiXzf`)9(r4BTP)QA4AZwzh}J zg$`DZtS9*zSbpnzInt*8zK)i`44JRN!X)_!lGa@on==C#Hob;(Q>a%I;9QLbNh2-b z=fUr}?p!!BG5NPrc4;7LFkhaBqFOzYB8JAp$NYle3-qsENNn-!|^LEnT;@ z@eqND;#*C;Gj00000NkvXXu0mjfmMe)l literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/player/player1/idle/idle (1).png.meta b/client/assets/resources/texture/player/player1/idle/idle (1).png.meta new file mode 100644 index 0000000..99d6d68 --- /dev/null +++ b/client/assets/resources/texture/player/player1/idle/idle (1).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "f0f5e564-2d98-4de1-bb92-794eeb1acffc", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "f0f5e564-2d98-4de1-bb92-794eeb1acffc@6c48a", + "displayName": "idle (1)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "f0f5e564-2d98-4de1-bb92-794eeb1acffc", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "f0f5e564-2d98-4de1-bb92-794eeb1acffc@f9941", + "displayName": "idle (1)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 16, + "height": 16, + "rawWidth": 16, + "rawHeight": 16, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -8, + -8, + 0, + 8, + -8, + 0, + -8, + 8, + 0, + 8, + 8, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 16, + 16, + 16, + 0, + 0, + 16, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -8, + -8, + 0 + ], + "maxPos": [ + 8, + 8, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "f0f5e564-2d98-4de1-bb92-794eeb1acffc@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "f0f5e564-2d98-4de1-bb92-794eeb1acffc@f9941" + } +} diff --git a/client/assets/resources/texture/player/player1/idle/idle (2).png b/client/assets/resources/texture/player/player1/idle/idle (2).png new file mode 100644 index 0000000000000000000000000000000000000000..89d6ea32b2c9a5b7a8e38037e9d6c8fd57cc29d2 GIT binary patch literal 325 zcmV-L0lNN)P)7LFkhaBqFOzYB8JAp$NYle3-qsENNn-!|^LEnT;@ z@eqND;#*C;Gj00000NkvXXu0mjfmMe)l literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/player/player1/idle/idle (2).png.meta b/client/assets/resources/texture/player/player1/idle/idle (2).png.meta new file mode 100644 index 0000000..2ec5247 --- /dev/null +++ b/client/assets/resources/texture/player/player1/idle/idle (2).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "948973f1-d0d7-4009-a6ac-b75d81682b06", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "948973f1-d0d7-4009-a6ac-b75d81682b06@6c48a", + "displayName": "idle (2)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "948973f1-d0d7-4009-a6ac-b75d81682b06", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "948973f1-d0d7-4009-a6ac-b75d81682b06@f9941", + "displayName": "idle (2)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 16, + "height": 16, + "rawWidth": 16, + "rawHeight": 16, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -8, + -8, + 0, + 8, + -8, + 0, + -8, + 8, + 0, + 8, + 8, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 16, + 16, + 16, + 0, + 0, + 16, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -8, + -8, + 0 + ], + "maxPos": [ + 8, + 8, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "948973f1-d0d7-4009-a6ac-b75d81682b06@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "948973f1-d0d7-4009-a6ac-b75d81682b06@f9941" + } +} diff --git a/client/assets/resources/texture/player/player1/idle/idle (3).png b/client/assets/resources/texture/player/player1/idle/idle (3).png new file mode 100644 index 0000000000000000000000000000000000000000..2c6384f86294d0a8ae368079a3d4f2cb27aaf555 GIT binary patch literal 311 zcmV-70m%M|P)u5q`H{AMZ*Yb6 zY6Adxn9i))^6lALYZw~t4~F0nbYES(JUO-HH3VIZM&pZhuZVxYKgMs{8f{w}zYj-5 zt+YsDEB`qE$6-G~R+N`Tl(LD4n9?WIr~n`ZP;9NdLy&W>vZ6Hc?(00DPa8zexym_L zL`;3GKNS&kVgT960N5IsBoX^Qt@G}SI}l!i8zA~uxP?Rjz!6@(TuKWONo4>4002ov JPDHLkV1khXf9L=J literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/player/player1/idle/idle (3).png.meta b/client/assets/resources/texture/player/player1/idle/idle (3).png.meta new file mode 100644 index 0000000..18c4664 --- /dev/null +++ b/client/assets/resources/texture/player/player1/idle/idle (3).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "fbd2f8e1-fcfb-4833-88f6-1d2aabc7d208", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "fbd2f8e1-fcfb-4833-88f6-1d2aabc7d208@6c48a", + "displayName": "idle (3)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "fbd2f8e1-fcfb-4833-88f6-1d2aabc7d208", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "fbd2f8e1-fcfb-4833-88f6-1d2aabc7d208@f9941", + "displayName": "idle (3)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 16, + "height": 16, + "rawWidth": 16, + "rawHeight": 16, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -8, + -8, + 0, + 8, + -8, + 0, + -8, + 8, + 0, + 8, + 8, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 16, + 16, + 16, + 0, + 0, + 16, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -8, + -8, + 0 + ], + "maxPos": [ + 8, + 8, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "fbd2f8e1-fcfb-4833-88f6-1d2aabc7d208@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "fbd2f8e1-fcfb-4833-88f6-1d2aabc7d208@f9941" + } +} diff --git a/client/assets/resources/texture/player/player1/idle/idle (4).png b/client/assets/resources/texture/player/player1/idle/idle (4).png new file mode 100644 index 0000000000000000000000000000000000000000..2c6384f86294d0a8ae368079a3d4f2cb27aaf555 GIT binary patch literal 311 zcmV-70m%M|P)u5q`H{AMZ*Yb6 zY6Adxn9i))^6lALYZw~t4~F0nbYES(JUO-HH3VIZM&pZhuZVxYKgMs{8f{w}zYj-5 zt+YsDEB`qE$6-G~R+N`Tl(LD4n9?WIr~n`ZP;9NdLy&W>vZ6Hc?(00DPa8zexym_L zL`;3GKNS&kVgT960N5IsBoX^Qt@G}SI}l!i8zA~uxP?Rjz!6@(TuKWONo4>4002ov JPDHLkV1khXf9L=J literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/player/player1/idle/idle (4).png.meta b/client/assets/resources/texture/player/player1/idle/idle (4).png.meta new file mode 100644 index 0000000..04d49dc --- /dev/null +++ b/client/assets/resources/texture/player/player1/idle/idle (4).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "3f793c28-7ba4-49a0-8bfd-f39c447a3d24", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "3f793c28-7ba4-49a0-8bfd-f39c447a3d24@6c48a", + "displayName": "idle (4)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "3f793c28-7ba4-49a0-8bfd-f39c447a3d24", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "3f793c28-7ba4-49a0-8bfd-f39c447a3d24@f9941", + "displayName": "idle (4)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 16, + "height": 16, + "rawWidth": 16, + "rawHeight": 16, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -8, + -8, + 0, + 8, + -8, + 0, + -8, + 8, + 0, + 8, + 8, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 16, + 16, + 16, + 0, + 0, + 16, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -8, + -8, + 0 + ], + "maxPos": [ + 8, + 8, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "3f793c28-7ba4-49a0-8bfd-f39c447a3d24@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "3f793c28-7ba4-49a0-8bfd-f39c447a3d24@f9941" + } +} diff --git a/client/assets/resources/texture/player/player1/idle/idle (5).png b/client/assets/resources/texture/player/player1/idle/idle (5).png new file mode 100644 index 0000000000000000000000000000000000000000..c1c809fa979b957e2c3a9ce4cc8c96da657389d9 GIT binary patch literal 309 zcmV-50m}Y~P)JlQH52uRkmS#MA207gL?X(@-T^M!5=E3XX>t@21OS*cVKsd8fFamr8=y}9`1`$Y_=QuGgB3LO@^E+HjZUdx{rlt2-EPlYM^$%wmcQAi zM3mc`@trn^NfXcO4>m03S7haq=oAXAZB{Pb7;CKnhCuo1`OziJlQH52uRkmS#MA207gL?X(@-T^M!5=E3XX>t@21OS*cVKsd8fFamr8=y}9`1`$Y_=QuGgB3LO@^E+HjZUdx{rlt2-EPlYM^$%wmcQAi zM3mc`@trn^NfXcO4>m03S7haq=oAXAZB{Pb7;CKnhCuo1`Ozi1p=5JjJYSlf_3R|v*nV;>-G3O5N(kyV?{7jR`cO>W|Ck}?;_0U{C*!dFNiu(TMQ z!tAnIYh^<|EDZDK|Jj*=el2-k6ocl7~!dFSc6%XMZO6f z?(RbCG65u@{1N0V%Mt(~x@&;dOUiDilR$F`sK`qkz7>l#&?Yue{uN|nSwIZ%2R{p1 UC0Wx_p#T5?07*qoM6N<$f+aAB7XSbN literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/player/player1/run/run (1).png.meta b/client/assets/resources/texture/player/player1/run/run (1).png.meta new file mode 100644 index 0000000..e9e016e --- /dev/null +++ b/client/assets/resources/texture/player/player1/run/run (1).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "030f870c-7083-4e63-af9c-0c8e4406b231", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "030f870c-7083-4e63-af9c-0c8e4406b231@6c48a", + "displayName": "run (1)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "030f870c-7083-4e63-af9c-0c8e4406b231", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "030f870c-7083-4e63-af9c-0c8e4406b231@f9941", + "displayName": "run (1)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 16, + "height": 16, + "rawWidth": 16, + "rawHeight": 16, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -8, + -8, + 0, + 8, + -8, + 0, + -8, + 8, + 0, + 8, + 8, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 16, + 16, + 16, + 0, + 0, + 16, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -8, + -8, + 0 + ], + "maxPos": [ + 8, + 8, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "030f870c-7083-4e63-af9c-0c8e4406b231@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "030f870c-7083-4e63-af9c-0c8e4406b231@f9941" + } +} diff --git a/client/assets/resources/texture/player/player1/run/run (2).png b/client/assets/resources/texture/player/player1/run/run (2).png new file mode 100644 index 0000000000000000000000000000000000000000..9ba3d37e47e379150efb8576d46b0cb0e30c90a7 GIT binary patch literal 336 zcmV-W0k8gvP)?+8y7B&NALn&rBn*_0ER48?QfCC>OyuGDOcE@`e)MQ|g=Ns~TQ|$jF@cs1( zz;v->x>$P20M0O!3MCl~0XTkr0^scYhmZF|;%tQ-;$8;xD3Ul^6+|wccJ=`$3>)0K1)TRR!WbOU+0d i|3MR~Pxz0E6yO)y`F(RCh$%t<0000XK~$ literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/player/player1/run/run (2).png.meta b/client/assets/resources/texture/player/player1/run/run (2).png.meta new file mode 100644 index 0000000..186d35e --- /dev/null +++ b/client/assets/resources/texture/player/player1/run/run (2).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "38dbf9d6-4b70-4898-a328-ae498501ddbd", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "38dbf9d6-4b70-4898-a328-ae498501ddbd@6c48a", + "displayName": "run (2)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "38dbf9d6-4b70-4898-a328-ae498501ddbd", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "38dbf9d6-4b70-4898-a328-ae498501ddbd@f9941", + "displayName": "run (2)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 16, + "height": 16, + "rawWidth": 16, + "rawHeight": 16, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -8, + -8, + 0, + 8, + -8, + 0, + -8, + 8, + 0, + 8, + 8, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 16, + 16, + 16, + 0, + 0, + 16, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -8, + -8, + 0 + ], + "maxPos": [ + 8, + 8, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "38dbf9d6-4b70-4898-a328-ae498501ddbd@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "38dbf9d6-4b70-4898-a328-ae498501ddbd@f9941" + } +} diff --git a/client/assets/resources/texture/player/player1/run/run (3).png b/client/assets/resources/texture/player/player1/run/run (3).png new file mode 100644 index 0000000000000000000000000000000000000000..2946658ef96daba1eeed0c5d1f1cf9dd17d16c1e GIT binary patch literal 332 zcmV-S0ki&zP)?+8y7AdkKhHmN)ZY@L05Kby0F%bV7DGXPzWJca4*z^ z!gHYslXRwW;|~Lm$NT^J`QL;8gw}zy&FuS#S_cyMd#xf)0f4yQBO6@Q1YKgvCs2~7 z^T%5M`tn?g;%m=qN$Wty(L`<^p2dZx3#Wtb@kv#8ItSj*U`GZe@_bF6udDh`0w3>h z0L+#vX3LeA4B!ky>p-I62!NxfdjL+)K6!mP#3U(ph+7#f!ca_-R>X1}8NdKYZff(& zCIXlwB^r*%_zAP?H15G748=a0<{L*7QA!J7Tp5^c$vTwMcL1ABarN7Zy_e{MMXb== eLaPf4F~B$Tnspn|Wwb{C0000KGN_3I_@cKIcu@&0aCGvi>9ExQ*{35HcYT>#?^BRG` zG3GvltDd!yz|m-(9VUyjkFXl>IBYXjJ;Cg(H(P>v0;9FHdR*n2#vh*^v0D6oe*Qg= zeSKZ~=8KF69j@HiGz(!rAi|h4gi9)eK;4h7gXLzRm!6`q%)_>;Lj~Y~lqWw@tK8AvLDchyVsaFxTD{09)5pUJz!+ zDrtbN>lPN}b|NNaf61G@AT%11nPF!)jeqr+dH?_3|3COo2q8^V&vu9?gfwZd+bB{g0Fd^&ETR)fuu7~I60qdE z`)B9Jts0V=}~LYm?E1ps?54*(nHO2ghI(+H^Hro4&v_Q)YWeF|LSJ`gKYf+9PHBBO$RBIfFOoj(!~qO z<+U36g@gCw-iLR0@8F*beoKg$!jD;-H}*`y618l&3YGsb6_rFipg`o zI1g9DKQEv@%4JZ*ECH;|Uo^j>LHO2ghI(+H^Hro4&v_Q)YWeF|LSJ`gKYf+9PHBBO$RBIfFOoj(!~qO z<+U36g@gCw-iLR0@8F*beoKg$!jD;-H}*`y618l&3YGsb6_rFipg`o zI1g9DKQEv@%4JZ*ECH;|Uo^j>L@pPb$a2DVp{!0C6d;JAE2j(Ki zO=d$^f?9sLfaXiAf+A*FcJrk9HDxN`0%hS}xCD{`oB(XfYA!+$%-R3|002ovPDHLk FV1i4MfQJA8 literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/player/player2/idle/idle (3).png.meta b/client/assets/resources/texture/player/player2/idle/idle (3).png.meta new file mode 100644 index 0000000..6176648 --- /dev/null +++ b/client/assets/resources/texture/player/player2/idle/idle (3).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "8e5e2721-dd1b-4104-a176-e8724688e705", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "8e5e2721-dd1b-4104-a176-e8724688e705@6c48a", + "displayName": "idle (3)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "8e5e2721-dd1b-4104-a176-e8724688e705", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "8e5e2721-dd1b-4104-a176-e8724688e705@f9941", + "displayName": "idle (3)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 16, + "height": 16, + "rawWidth": 16, + "rawHeight": 16, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -8, + -8, + 0, + 8, + -8, + 0, + -8, + 8, + 0, + 8, + 8, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 16, + 16, + 16, + 0, + 0, + 16, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -8, + -8, + 0 + ], + "maxPos": [ + 8, + 8, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "8e5e2721-dd1b-4104-a176-e8724688e705@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "8e5e2721-dd1b-4104-a176-e8724688e705@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/idle/idle (4).png b/client/assets/resources/texture/player/player2/idle/idle (4).png new file mode 100644 index 0000000000000000000000000000000000000000..068a438f97add04109ad6fa7d860e1f2dcd0ed31 GIT binary patch literal 310 zcmV-60m=S}P);wK=(RT?E!+_iCt0uPp_+&C)pFpB^k+;L* z5Yq0b0~n2aq*(&Ma3kty%f6-D9a&7bT|fvKZiLxosX}})z(tt6KbWT7--=ZLK)E}z zx~WLBgvE4Ank9`LN(J~X0G{6NRNE_VJJwdwWWII)qj66i;YWan_$&3N?e!OE4&-qx z?(uoxYEUj>I)1%??n`WfBIdpB=0)>cDpbH3D#E{T4x|A10%taAD5vLY-2eap07*qo IM6N<$f_!C)nE(I) literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/player/player2/idle/idle (4).png.meta b/client/assets/resources/texture/player/player2/idle/idle (4).png.meta new file mode 100644 index 0000000..4fd6744 --- /dev/null +++ b/client/assets/resources/texture/player/player2/idle/idle (4).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "ad1888b4-e372-4e48-bbeb-5f33b0fb50bf", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "ad1888b4-e372-4e48-bbeb-5f33b0fb50bf@6c48a", + "displayName": "idle (4)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "ad1888b4-e372-4e48-bbeb-5f33b0fb50bf", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "ad1888b4-e372-4e48-bbeb-5f33b0fb50bf@f9941", + "displayName": "idle (4)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 16, + "height": 16, + "rawWidth": 16, + "rawHeight": 16, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -8, + -8, + 0, + 8, + -8, + 0, + -8, + 8, + 0, + 8, + 8, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 16, + 16, + 16, + 0, + 0, + 16, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -8, + -8, + 0 + ], + "maxPos": [ + 8, + 8, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "ad1888b4-e372-4e48-bbeb-5f33b0fb50bf@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "ad1888b4-e372-4e48-bbeb-5f33b0fb50bf@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/idle/idle (5).png b/client/assets/resources/texture/player/player2/idle/idle (5).png new file mode 100644 index 0000000000000000000000000000000000000000..48563a2c55465ea02e532fcae0e92cdb4f28d587 GIT binary patch literal 323 zcmV-J0lfZ+P)(*_tl?F73R3aFzZ5i>vGcc3vTYa1f9z(_9*N z@%H0De6X-Hv+wPj8Q?*PP=QERc8*y&@4W&cbb`AoU8|fz;l@Jt8Rp`~zAV VYw7q){b~RJ002ovPDHLkV1kTpjeh_D literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/player/player2/idle/idle (5).png.meta b/client/assets/resources/texture/player/player2/idle/idle (5).png.meta new file mode 100644 index 0000000..bf0d5d1 --- /dev/null +++ b/client/assets/resources/texture/player/player2/idle/idle (5).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "42bedea5-98e7-4c7c-bba4-2733775c4d1b", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "42bedea5-98e7-4c7c-bba4-2733775c4d1b@6c48a", + "displayName": "idle (5)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "42bedea5-98e7-4c7c-bba4-2733775c4d1b", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "42bedea5-98e7-4c7c-bba4-2733775c4d1b@f9941", + "displayName": "idle (5)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 16, + "height": 16, + "rawWidth": 16, + "rawHeight": 16, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -8, + -8, + 0, + 8, + -8, + 0, + -8, + 8, + 0, + 8, + 8, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 16, + 16, + 16, + 0, + 0, + 16, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -8, + -8, + 0 + ], + "maxPos": [ + 8, + 8, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "42bedea5-98e7-4c7c-bba4-2733775c4d1b@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "42bedea5-98e7-4c7c-bba4-2733775c4d1b@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/idle/idle (6).png b/client/assets/resources/texture/player/player2/idle/idle (6).png new file mode 100644 index 0000000000000000000000000000000000000000..48563a2c55465ea02e532fcae0e92cdb4f28d587 GIT binary patch literal 323 zcmV-J0lfZ+P)(*_tl?F73R3aFzZ5i>vGcc3vTYa1f9z(_9*N z@%H0De6X-Hv+wPj8Q?*PP=QERc8*y&@4W&cbb`AoU8|fz;l@Jt8Rp`~zAV VYw7q){b~RJ002ovPDHLkV1kTpjeh_D literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/player/player2/idle/idle (6).png.meta b/client/assets/resources/texture/player/player2/idle/idle (6).png.meta new file mode 100644 index 0000000..84e593f --- /dev/null +++ b/client/assets/resources/texture/player/player2/idle/idle (6).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "a70a2ba8-14bc-4613-a6bf-e914fca9ae9a", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "a70a2ba8-14bc-4613-a6bf-e914fca9ae9a@6c48a", + "displayName": "idle (6)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "a70a2ba8-14bc-4613-a6bf-e914fca9ae9a", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "a70a2ba8-14bc-4613-a6bf-e914fca9ae9a@f9941", + "displayName": "idle (6)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 16, + "height": 16, + "rawWidth": 16, + "rawHeight": 16, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -8, + -8, + 0, + 8, + -8, + 0, + -8, + 8, + 0, + 8, + 8, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 16, + 16, + 16, + 0, + 0, + 16, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -8, + -8, + 0 + ], + "maxPos": [ + 8, + 8, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "a70a2ba8-14bc-4613-a6bf-e914fca9ae9a@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "a70a2ba8-14bc-4613-a6bf-e914fca9ae9a@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/run.meta b/client/assets/resources/texture/player/player2/run.meta new file mode 100644 index 0000000..82d5618 --- /dev/null +++ b/client/assets/resources/texture/player/player2/run.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "c957e484-e081-4832-a24d-6541bd2f40d4", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/player/player2/run/run (1).png b/client/assets/resources/texture/player/player2/run/run (1).png new file mode 100644 index 0000000000000000000000000000000000000000..6dbd81d6a96ae49a5fbdb6d61aedcab0666e512b GIT binary patch literal 306 zcmV-20nPr2P)Sq7T&Hh0*KcGWD!OadLNI?)w7G0XqUK2a` zrpx8tyO-Pne}dUAI2Rw9ld|g68wEHQpTl;6*<`G9_vahO?9vhG2$;yfL>x*E;{ey? z!1%1$WQ;HlTF+xm@@6*&0C>KO^_Am1Dvd$_kf#Ntte8WStB25bZNxk+^m(WPDJ!O| zmA4nlskOQN4-}LO&v%ih1w7x?F@;f}i7*a~u~9(EiXF2{pJofzMN$)?w&@}b(MHrf z)T7#4Y7*)|lQ|csx*H`^B-DYj*+%w0-tFGvZ|41Wg9>taUpOVNEV{a0MMhu<$Y-4elxQG0FYIU%cMaN`pB~qLFk*B ziUsHt0I=RI*qQ|>)p+(T{~{-W4UtvNn(Qa&NuyTZ`H422`?`9rXY{~^ n&CKgS0bR@n!aidc{k_5)kN9PR%LJ(?00000NkvXXu0mjf8;pKy literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/player/player2/run/run (2).png.meta b/client/assets/resources/texture/player/player2/run/run (2).png.meta new file mode 100644 index 0000000..4bd5087 --- /dev/null +++ b/client/assets/resources/texture/player/player2/run/run (2).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "dde508f5-9208-42ee-aa19-e388489f0d5d", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "dde508f5-9208-42ee-aa19-e388489f0d5d@6c48a", + "displayName": "run (2)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "dde508f5-9208-42ee-aa19-e388489f0d5d", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "dde508f5-9208-42ee-aa19-e388489f0d5d@f9941", + "displayName": "run (2)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 16, + "height": 16, + "rawWidth": 16, + "rawHeight": 16, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -8, + -8, + 0, + 8, + -8, + 0, + -8, + 8, + 0, + 8, + 8, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 16, + 16, + 16, + 0, + 0, + 16, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -8, + -8, + 0 + ], + "maxPos": [ + 8, + 8, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "dde508f5-9208-42ee-aa19-e388489f0d5d@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "dde508f5-9208-42ee-aa19-e388489f0d5d@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/run/run (3).png b/client/assets/resources/texture/player/player2/run/run (3).png new file mode 100644 index 0000000000000000000000000000000000000000..f739823d9d5600eee8db538300aeddb5ea91e13d GIT binary patch literal 290 zcmV+-0p0$IP)iSwlUW4-g!?n=a)cjvEN46X zz)NB&6%bDW&>c0@SOr)cIq55ZBXxpxIRYN5d{SOZYP$lod(})%{>1*BR?n+8o2@jaLRsaA107*qoM6N<$f_K|=rT_o{ literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/player/player2/run/run (3).png.meta b/client/assets/resources/texture/player/player2/run/run (3).png.meta new file mode 100644 index 0000000..0f1eada --- /dev/null +++ b/client/assets/resources/texture/player/player2/run/run (3).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "547581ee-f0ef-4cc0-a168-1a821008dc00", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "547581ee-f0ef-4cc0-a168-1a821008dc00@6c48a", + "displayName": "run (3)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "547581ee-f0ef-4cc0-a168-1a821008dc00", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "547581ee-f0ef-4cc0-a168-1a821008dc00@f9941", + "displayName": "run (3)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 16, + "height": 16, + "rawWidth": 16, + "rawHeight": 16, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -8, + -8, + 0, + 8, + -8, + 0, + -8, + 8, + 0, + 8, + 8, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 16, + 16, + 16, + 0, + 0, + 16, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -8, + -8, + 0 + ], + "maxPos": [ + 8, + 8, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "547581ee-f0ef-4cc0-a168-1a821008dc00@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "547581ee-f0ef-4cc0-a168-1a821008dc00@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/run/run (4).png b/client/assets/resources/texture/player/player2/run/run (4).png new file mode 100644 index 0000000000000000000000000000000000000000..72ab094def46a8090f012f5c3d11f636ebbcd89f GIT binary patch literal 325 zcmV-L0lNN)P)JV#Wu>P3Loe*N+|#-P`=x%ba6EH>K~qy>=7 zzd<_OoTM>!w^!m=gI*U&8aKvM=jMm$5C9NH0VX?*^>rzN03go_5LK$flXoA!ZP#VY zv%>B@6A)F(v{vqqDErRK-EUxIx(K5Hc~&5d0vmIQfO92jEXE>$s8Wl~*6z#w@h`qC zt^HbBPtW6;|4{ysW)jfz^m256gSXcMPA8iGq*r_d(QL%bw%&8pH^ht${c8k=Rsiq~ XzrblbL6!Y*00000NkvXXu0mjf_&1IL literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/player/player2/run/run (4).png.meta b/client/assets/resources/texture/player/player2/run/run (4).png.meta new file mode 100644 index 0000000..3250f70 --- /dev/null +++ b/client/assets/resources/texture/player/player2/run/run (4).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "2f8cf8e1-92d9-422b-9ccb-444e0d7578e5", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "2f8cf8e1-92d9-422b-9ccb-444e0d7578e5@6c48a", + "displayName": "run (4)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "2f8cf8e1-92d9-422b-9ccb-444e0d7578e5", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "2f8cf8e1-92d9-422b-9ccb-444e0d7578e5@f9941", + "displayName": "run (4)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 16, + "height": 16, + "rawWidth": 16, + "rawHeight": 16, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -8, + -8, + 0, + 8, + -8, + 0, + -8, + 8, + 0, + 8, + 8, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 16, + 16, + 16, + 0, + 0, + 16, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -8, + -8, + 0 + ], + "maxPos": [ + 8, + 8, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "2f8cf8e1-92d9-422b-9ccb-444e0d7578e5@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "2f8cf8e1-92d9-422b-9ccb-444e0d7578e5@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/run/run (5).png b/client/assets/resources/texture/player/player2/run/run (5).png new file mode 100644 index 0000000000000000000000000000000000000000..e4ed8acce8163d8cc486ac7bdafdcc26cd38ad03 GIT binary patch literal 277 zcmV+w0qXvVP)jEcITN-XNU^u!xPdT~Y)=7KC8fMyp+u+0jJ& z)iBF{`)3$|50cV*(w^3(pgpHy%$vmo!+y{9uJ;Fa$BP3IRg$D0O-)i+0C?5c;;J zVgV)v04%ptwq^lZm!i7mHgXdD3SmbuQhCt`U@sBiPZ@B}nF7|0U%s`cfM3iO@^uGo b^!Era_R3jWNM+-200000NkvXXu0mjfsg`f_ literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/player/player2/run/run (5).png.meta b/client/assets/resources/texture/player/player2/run/run (5).png.meta new file mode 100644 index 0000000..f6bd947 --- /dev/null +++ b/client/assets/resources/texture/player/player2/run/run (5).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "ba54e885-1a08-47f1-b009-83b2763e209c", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "ba54e885-1a08-47f1-b009-83b2763e209c@6c48a", + "displayName": "run (5)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "ba54e885-1a08-47f1-b009-83b2763e209c", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "ba54e885-1a08-47f1-b009-83b2763e209c@f9941", + "displayName": "run (5)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 16, + "height": 16, + "rawWidth": 16, + "rawHeight": 16, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -8, + -8, + 0, + 8, + -8, + 0, + -8, + 8, + 0, + 8, + 8, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 16, + 16, + 16, + 0, + 0, + 16, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -8, + -8, + 0 + ], + "maxPos": [ + 8, + 8, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "ba54e885-1a08-47f1-b009-83b2763e209c@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "ba54e885-1a08-47f1-b009-83b2763e209c@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/run/run (6).png b/client/assets/resources/texture/player/player2/run/run (6).png new file mode 100644 index 0000000000000000000000000000000000000000..019298fbe820c035fd781d36b3f8cdf27fc452e5 GIT binary patch literal 309 zcmV-50m}Y~P)4?(VoU?JFP5er`+Ro)h6rs>5A>vK8oH%0(vO&eKQ0!06^l`t>9E+%+;? literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/player/player2/run/run (6).png.meta b/client/assets/resources/texture/player/player2/run/run (6).png.meta new file mode 100644 index 0000000..cfbae8c --- /dev/null +++ b/client/assets/resources/texture/player/player2/run/run (6).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "0ce683e1-3afe-44ff-b24f-0be7ae40e49a", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "0ce683e1-3afe-44ff-b24f-0be7ae40e49a@6c48a", + "displayName": "run (6)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "0ce683e1-3afe-44ff-b24f-0be7ae40e49a", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "0ce683e1-3afe-44ff-b24f-0be7ae40e49a@f9941", + "displayName": "run (6)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 16, + "height": 16, + "rawWidth": 16, + "rawHeight": 16, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -8, + -8, + 0, + 8, + -8, + 0, + -8, + 8, + 0, + 8, + 8, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 16, + 16, + 16, + 0, + 0, + 16, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -8, + -8, + 0 + ], + "maxPos": [ + 8, + 8, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "0ce683e1-3afe-44ff-b24f-0be7ae40e49a@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "0ce683e1-3afe-44ff-b24f-0be7ae40e49a@f9941" + } +} diff --git a/client/assets/resources/texture/weapon.meta b/client/assets/resources/texture/weapon.meta new file mode 100644 index 0000000..07f612b --- /dev/null +++ b/client/assets/resources/texture/weapon.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "c3b32cc3-fa22-4efd-a481-c5876d5cced3", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/weapon/weapon1.meta b/client/assets/resources/texture/weapon/weapon1.meta new file mode 100644 index 0000000..9850646 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "fb8659d0-2770-4f82-bfb4-2bd2c183f241", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/weapon/weapon1/attack.meta b/client/assets/resources/texture/weapon/weapon1/attack.meta new file mode 100644 index 0000000..6c6a897 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1/attack.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "0ed73ab4-b2c1-4624-a5b8-c5f31394d8fa", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (1).png b/client/assets/resources/texture/weapon/weapon1/attack/attack (1).png new file mode 100644 index 0000000000000000000000000000000000000000..f31fdea7f9091f640fe142c4246bc17da2a68f3a GIT binary patch literal 291 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}cRgJkLn7Rh zQzQ}&SRD9f++&qs!s6x(Bwh$H<;QXTao79ca>V|?+oe01FX*;gvOMcxEM_>NsNf!O zno+~CN9GPt(Sx;l9;FOn-A0R*4^A`rp6kBR$K?+*v#AWj_A7U8v^+ex*qz5Q@0^C1 z=bgy26Jif_XH~waHkcp8{-=DhVB&^p{}{}2ZrLjCP`zls@9@pq`Sy>w(%fP?C)_Y; zc+}8;-Qu8F;zoh=kf2%I2lyBm=l0uA)K$}b8xX~(pl&lsM{U_w*HY%rjUtg}S1^N} e4kp-aSQw^#az4ANPh}<0qYR#|elF{r5}E*}jB9cL literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (1).png.meta b/client/assets/resources/texture/weapon/weapon1/attack/attack (1).png.meta new file mode 100644 index 0000000..0e457e7 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1/attack/attack (1).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "2c2efb05-aaa7-4c95-8186-f16a448171aa", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "2c2efb05-aaa7-4c95-8186-f16a448171aa@6c48a", + "displayName": "attack (1)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "2c2efb05-aaa7-4c95-8186-f16a448171aa", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "2c2efb05-aaa7-4c95-8186-f16a448171aa@f9941", + "displayName": "attack (1)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "2c2efb05-aaa7-4c95-8186-f16a448171aa@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "2c2efb05-aaa7-4c95-8186-f16a448171aa@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (2).png b/client/assets/resources/texture/weapon/weapon1/attack/attack (2).png new file mode 100644 index 0000000000000000000000000000000000000000..70c59bcff6c9ccc54b2101d45cfbf7f6d406f6e9 GIT binary patch literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}-#lF$Ln7Rh zQzQ}&SRD9f++&qs!s6x(Bwoldz5mSeubIpKpr`zSvdd=~6}la#rKN~B%3e5U!~ce3 zmjy#g<cYF zAHVCn7r~5e-S#sNeA18K-?WnXcB{;P3B5zYOEmZxA{m%=&)cJDCT39MmnFqu&A>K6 zN6n0-&}xbZ^8{fz&0indgs$=^ndx1)+KcSa1I`Q#kM+z_-zK~b1$v6X)78&qol`;+ E00sYI-~a#s literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (3).png.meta b/client/assets/resources/texture/weapon/weapon1/attack/attack (3).png.meta new file mode 100644 index 0000000..4134d64 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1/attack/attack (3).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "bb13c3df-251c-4b9b-a7e9-520ef89b6be6", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "bb13c3df-251c-4b9b-a7e9-520ef89b6be6@6c48a", + "displayName": "attack (3)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "bb13c3df-251c-4b9b-a7e9-520ef89b6be6", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "bb13c3df-251c-4b9b-a7e9-520ef89b6be6@f9941", + "displayName": "attack (3)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "bb13c3df-251c-4b9b-a7e9-520ef89b6be6@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "bb13c3df-251c-4b9b-a7e9-520ef89b6be6@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (4).png b/client/assets/resources/texture/weapon/weapon1/attack/attack (4).png new file mode 100644 index 0000000000000000000000000000000000000000..0c4d3fa39a8a67da6cf418d0055f1544bc44a603 GIT binary patch literal 271 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Cp}#pLn7Rh zQzQ}&SRD9f++&qs!s6x(Ax^X(s26%Av}T^FIm-dDbT{`$TmIkayF? literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (4).png.meta b/client/assets/resources/texture/weapon/weapon1/attack/attack (4).png.meta new file mode 100644 index 0000000..db27f74 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1/attack/attack (4).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "717f9b68-fbe2-4f31-ac87-476fa2875f1e", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "717f9b68-fbe2-4f31-ac87-476fa2875f1e@6c48a", + "displayName": "attack (4)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "717f9b68-fbe2-4f31-ac87-476fa2875f1e", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "717f9b68-fbe2-4f31-ac87-476fa2875f1e@f9941", + "displayName": "attack (4)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "717f9b68-fbe2-4f31-ac87-476fa2875f1e@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "717f9b68-fbe2-4f31-ac87-476fa2875f1e@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (5).png b/client/assets/resources/texture/weapon/weapon1/attack/attack (5).png new file mode 100644 index 0000000000000000000000000000000000000000..6c08308378bdbb178339f013303cf3c7278ced4a GIT binary patch literal 333 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^TEDn4#?y*WRVR3T?6AiZ%KghdZ?7J-ICDV`?nO355<6p6P-r>82pWa9c%wEOE z5Y4lh=jL&t^04Ne?(?|}-c)^JQ)|6G`A8eXo$b$#sqqBF8;X4VWEAr-J$=Kpe+=8! z{Cgt*MM5FN&XJXehv)y@6qg6n8ggco`FA{g`a1l^qS+Fk1HK3@W<1Kc-~lURfIxS5 z*FhPl9?OW!>W;nnVcbp4_NyjH<{4g5*$`J4xbgpm3kn%xk&bLd4$(p?dB5%I+m>gn zIND=U&T!(GQe0et#+TZEJ#S9`FX?1r%5|G?_ykwgqE8yOQfowZ&XeMkDLs(E(bEPb a7#Ln?_$Y4Qp&$Yb9|liXKbLh*2~7Zt>x3@= literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (5).png.meta b/client/assets/resources/texture/weapon/weapon1/attack/attack (5).png.meta new file mode 100644 index 0000000..4cf94af --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1/attack/attack (5).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "ee283844-4937-4d21-9cb2-41e66321215a", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "ee283844-4937-4d21-9cb2-41e66321215a@6c48a", + "displayName": "attack (5)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "ee283844-4937-4d21-9cb2-41e66321215a", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "ee283844-4937-4d21-9cb2-41e66321215a@f9941", + "displayName": "attack (5)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "ee283844-4937-4d21-9cb2-41e66321215a@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "ee283844-4937-4d21-9cb2-41e66321215a@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (6).png b/client/assets/resources/texture/weapon/weapon1/attack/attack (6).png new file mode 100644 index 0000000000000000000000000000000000000000..cc205a93f347b6e224e84db1685e45f09087175d GIT binary patch literal 312 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}pFCY0Ln7Rh zQzQ}&SRD9f++&qs!s6x(Ax^X(s26%Av}T^FIm-dDbT{`$TmIkayBZij^Hlg*DDWAUr@C}KEcrqbPcwg2+MB@zvDK6qSgH=nX1O<-eTnjEfZw zq?i^fGVnK=uV($fUG;C`i{F1{u3OmjkRia+)!+TX)$KRBvKcPt8YzA__C5jVBL+`b KKbLh*2~7YB>}xpy literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (7).png.meta b/client/assets/resources/texture/weapon/weapon1/attack/attack (7).png.meta new file mode 100644 index 0000000..01c3a97 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1/attack/attack (7).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "05abc781-c414-41cf-8961-6a28a689e011", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "05abc781-c414-41cf-8961-6a28a689e011@6c48a", + "displayName": "attack (7)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "05abc781-c414-41cf-8961-6a28a689e011", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "05abc781-c414-41cf-8961-6a28a689e011@f9941", + "displayName": "attack (7)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "05abc781-c414-41cf-8961-6a28a689e011@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "05abc781-c414-41cf-8961-6a28a689e011@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon1/idle.meta b/client/assets/resources/texture/weapon/weapon1/idle.meta new file mode 100644 index 0000000..49160e6 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1/idle.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "7b876fea-1bd1-41a0-93a8-bd20d64d7bc3", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/weapon/weapon1/idle/idle (1).png b/client/assets/resources/texture/weapon/weapon1/idle/idle (1).png new file mode 100644 index 0000000000000000000000000000000000000000..2b4aa1da52212f3fb2c2e35b45d75b6717b8c77e GIT binary patch literal 243 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ydu{YLn7Rh zQzQ}&SRD9f++&qs!s6x(BTn!({!a-@lK3|95yOt9&yK0_@XOgU?N&T-R&sgtxw|`f zr(0KkBZij^Hlg*DDWAUr@C}KEcrqbPcwg2+MB@zvDK6qSgH=nX1O<-eTnjEfZw gq?o`2vm6t{|4k~2cXgcwfDUKyboFyt=akR{0DqBL(*OVf literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/weapon/weapon1/idle/idle (1).png.meta b/client/assets/resources/texture/weapon/weapon1/idle/idle (1).png.meta new file mode 100644 index 0000000..4b8c260 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1/idle/idle (1).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "f815a77d-5654-4a6a-86ef-be8f1efaa95e", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "f815a77d-5654-4a6a-86ef-be8f1efaa95e@6c48a", + "displayName": "idle (1)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "f815a77d-5654-4a6a-86ef-be8f1efaa95e", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "f815a77d-5654-4a6a-86ef-be8f1efaa95e@f9941", + "displayName": "idle (1)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "f815a77d-5654-4a6a-86ef-be8f1efaa95e@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "f815a77d-5654-4a6a-86ef-be8f1efaa95e@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon2.meta b/client/assets/resources/texture/weapon/weapon2.meta new file mode 100644 index 0000000..3dcbcf0 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon2.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "7249fc9e-d7c5-4ecf-b450-99ae0a17c417", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/weapon/weapon2/attack.meta b/client/assets/resources/texture/weapon/weapon2/attack.meta new file mode 100644 index 0000000..0d4e72c --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon2/attack.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "b82f00e2-ef64-4845-9455-b855caa49483", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (1).png b/client/assets/resources/texture/weapon/weapon2/attack/attack (1).png new file mode 100644 index 0000000000000000000000000000000000000000..ab4b030f24eb05482577e5c0612322280dbd9b47 GIT binary patch literal 421 zcmV;W0b2fvP)Px$Ur9tkR9Hu2WEfz;IKcKZj5=U61ZWllZ&nNbhb3^4(Dyj)p}GT*Ek@2^xEw)M z2cTPy&*w15(Zm7h7QcBZ0FDk3@edgG(cA$r%Tb~O$sy!80G_y@hN74OiUwE+V6z;a zFrkhh#Q|W8-{%RyJtH{j1Bi{w47fwzyhP|h4+&x&@Za3ngu#pD0z;lT54r=eRwpn^ zMZ`Za;Bo*y*TW2j`vT^G>`e#<5UR*PmV*GfApo|#d-^u8Ay#IpU|Rj28D4uuLf^yX z@%bE9m+l6OAzOmOHE?rD%?1Bur8OBeq;Px$C`m*?R9Hu2WEfz;IKcKZj5=U61ZWlljpi)>>reh6Xg)y&q~sEir6BdhSPV0l zY7QXBa*!ja>Ht!FPW2EVC906sQX>Sw@eTz9&3m6G09P+K=>sD{4LE!TH$+@ij6t9M zAH%LEZwN*yvgJg(7>fh`n;V-jJb3hoK|xLqOd~k}Z%n+;6TpxsB?REUMs|P~%LSsM zzy9PO22vb=9Is#tx~Fdg(^h7xa0}Nu7-6-%@AGGD;*6w3!GBq4O$H5VU7Wtty}lhR zhr=?Q>4Dfph~j|Vr&ck*9CYL9WroL3uTw22;YtH24ggsS0!S8P=p(l5M-Nhbi4Y?l z;43)?yeJ0wj2uUhk`0N$`{Ln7Rh zQzQ}&SRD9f++&qs!qQg9vEyXNpZi~*@ZOYDj8@k89h7Bxf~QNyq1Pzo3geTu1NAZo z{Wn#rWG5sf{K(JCIrQPdMP)WtOG}H|Pj4g_T?%n46TI`$c-c3@NskzIxY_V2%+NF5 z)E#i;K@o$SK)L^Ywrd%w%es;dYz*GMF{*0~-x9VX+s(pK6>c$Zx-^SN>e4Qj+7|DF z?}Arv@H7;XX8k`=mcfYU*#3`Sj1E6ue!a6);-JPcN!Am543S(+9%8~KGoGMCX^n!fk<_sj*Y*-jlmiVt+TbHv4=ye89S3j3^P6mLn;OXk;vd$@?2>@0Wat8na literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (4).png.meta b/client/assets/resources/texture/weapon/weapon2/attack/attack (4).png.meta new file mode 100644 index 0000000..2bb1d53 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon2/attack/attack (4).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "57693857-efef-407b-b05a-3fa03e2c15a1", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "57693857-efef-407b-b05a-3fa03e2c15a1@6c48a", + "displayName": "attack (4)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "57693857-efef-407b-b05a-3fa03e2c15a1", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "57693857-efef-407b-b05a-3fa03e2c15a1@f9941", + "displayName": "attack (4)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "57693857-efef-407b-b05a-3fa03e2c15a1@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "57693857-efef-407b-b05a-3fa03e2c15a1@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (5).png b/client/assets/resources/texture/weapon/weapon2/attack/attack (5).png new file mode 100644 index 0000000000000000000000000000000000000000..283466f162c584ce09cf7ac79a8a9317d1c77595 GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}S3O-ELn7Rh zQzQ}&SRD9f++&qs!s6x(CK@IQ{ODgSp?=b5l8AETkNbCSv^+ex*qw)~sHouAlbgm0 zswy)*Cnd45vF%v@(V}6-FWx+TJN5*Y!tY;l6ArIE6B4LnS@y~-%zNV1#w!g!t{qF* zd&JTqENZf&bJTPRdBYv5Y7JN4&f3qguI~HF&>LSCRY>J?C|EP3Nc7Y{ewo^K+<(3B zQv;{WrVRE59act_ZcktP2w9&K0y&Yr6XcSd+1B)}YMYp19P)7mGt|jIceB~BFkFwf VP&~J41|QIa44$rjF6*2UngGdGX?6er literal 0 HcmV?d00001 diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (5).png.meta b/client/assets/resources/texture/weapon/weapon2/attack/attack (5).png.meta new file mode 100644 index 0000000..da06a55 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon2/attack/attack (5).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "037bbd7b-863b-458a-9e82-af4344212b37", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "037bbd7b-863b-458a-9e82-af4344212b37@6c48a", + "displayName": "attack (5)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "037bbd7b-863b-458a-9e82-af4344212b37", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "037bbd7b-863b-458a-9e82-af4344212b37@f9941", + "displayName": "attack (5)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "037bbd7b-863b-458a-9e82-af4344212b37@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "037bbd7b-863b-458a-9e82-af4344212b37@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (6).png b/client/assets/resources/texture/weapon/weapon2/attack/attack (6).png new file mode 100644 index 0000000000000000000000000000000000000000..c128cc3faab224be28e960cf0b5145aa75f02f8f GIT binary patch literal 320 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}zdT(WLn7Rh zQzQ}&SRD9f++&qs!s6x(B-&g#{cu@Y^iu*#>iLs@aaH9M_p-`jG+9#mk!^K!5|eZ0GI2Xo z7H5g+Od{+JHO$2qdY4a^l(XO4m!s+EeWFmYi`ijX6T_sVB9UHeUK?Iw+8Nn9N8rH9 z=V!AVcN}(cx*sefKDUzfaB4-m$whJMbBKhD5B`imE1MclvXpZWc;|c_h40L zal@J|YRzq1^bG9|txEg8GW5m~Lz^CBmI<;9Mm)#%fBa%}`0?`Vouv{7HPlWqDtJ3G zoJ?wB3qIU>W0TZXoi@t}uh@iMe?IuS!F)CA|L&H3%cD;uM3^k#V~FJIn$5_~SoK?O wafD0(`-EAoD;CbnTPZs|*KDUzfaB4-m$whJMbBKhD5B`imE1MclvXpZWc;|c_h40L zal@J|YRzq1^bG9|txEg8GW5m~Lz^CBmI<;9Mm)#%fBa%}`0?`Vouv{7HPlWqDtJ3G zoJ?wB3qIU>W0TZXoi@t}uh@iMe-32tX*-a?0Va562{16E-!)a-UfzEe=pP18S3j3^ HP6 ArrayBuffer + * function toArrayBuffer(buf) { + * var ab = new ArrayBuffer(buf.length); + * var view = new Uint8Array(ab); + * for (var i = 0; i < buf.length; ++i) { + * view[i] = buf[i]; + * } + * return ab; + * } + * // ArrayBuffer ---> Buffer + * function toBuffer(ab) { + * var buf = new Buffer(ab.byteLength); + * var view = new Uint8Array(ab); + * for (var i = 0; i < buf.length; ++i) { + * buf[i] = view[i]; + * } + * return buf; + * } + */ + +/** + * @example + * var { registerProto, Type, encode, decode, singleArray } = binary; + * registerProto(1001, { + * name: Type.String, + * age: Type.Uint8, + * sex: Type.Uint8 + * }) + * registerProto(1002, { + * info: 1001, + * gold: Type.Uint16, + * items: [Type.Uint16, Type.String] + * }) + * registerProto(1003, { + * array0: Type.Array, + * array1: singleArray(1002), + * array2: singleArray([1001, 1002]), + * array3: singleArray(Type.Uint16), + * array4: singleArray([Type.Uint16, Type.String]) + * }) + + * var buffer = encode({ name: 'Mary', age: 18, sex: 0 }, 1001); + * decode(buffer); + + * var buffer = encode({ info: { name: 'Mary', age: 18, sex: 0 }, gold: 10, array: [100, 2, 3] }, 1002); + * decode(buffer); + + * var buffer = encode({ + * array0: ['你好啊','我很好'], + * array1: [{ info: { name: 'James', age: 30, sex: 1 }, gold: 10, array: [100, 2, 3] }], + * array2: [[{}, { info: { name: 'Mary', age: 18, sex: 0 }, gold: 10, array: [100, 2, 3] }]], + * array3: [568], + * array4: [[0, '零'], [1, '一'], [2, '二'], [3, '三']] + * }, 1003); + * decode(buffer); + */ + +/** + * https://segmentfault.com/a/1190000014533505 中提到如果服务器开启了压缩了话,需要进行解压操作,并推荐了pako.js + * (具体也不知道这个压缩怎么回事,测试的时候也没遇到这个问题,先写注释记下来) + * @see https://github.com/nodeca/pako/edit/master/dist/pako.js + * @example + * let compressdata = new Uint8Array(buffer, byteOff, length); + * let uncompress = pako.inflate(compressdata);//解压数据 + * let uncompressdata = uncompress.buffer;// ArrayBuffer {} + * let dataViewData = new DataView(uncompressdata, 0);//解压后数据 + */ + + +/** +* A minimal base64 implementation for number arrays. +* @memberof util +* @namespace +*/ +class Base64 { + // Base64 encoding table + private b64 = new Array(64); + // Base64 decoding table + private s64 = new Array(123); + private invalidEncoding = "invalid encoding"; + + constructor() { + // 65..90, 97..122, 48..57, 43, 47 + for (var i = 0; i < 64;) { + this.s64[this.b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; + } + } + + /** + * Calculates the byte length of a base64 encoded string. + * @param {string} string Base64 encoded string + * @returns {number} Byte length + */ + length(string: string): number { + var p = string.length; + if (!p) + return 0; + var n = 0; + while (--p % 4 > 1 && string.charAt(p) === "=") + ++n; + return Math.ceil(string.length * 3) / 4 - n; + }; + + /** + * Encodes a buffer to a base64 encoded string. + * @param {DataView} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} Base64 encoded string + */ + read(buffer: DataView, start: number, end: number): string { + var parts = null, + chunk = []; + var i = 0, // output index + j = 0, // goto index + t; // temporary + while (start < end) { + var b = buffer.getUint8(start++); + switch (j) { + case 0: + chunk[i++] = this.b64[b >> 2]; + t = (b & 3) << 4; + j = 1; + break; + case 1: + chunk[i++] = this.b64[t | b >> 4]; + t = (b & 15) << 2; + j = 2; + break; + case 2: + chunk[i++] = this.b64[t | b >> 6]; + chunk[i++] = this.b64[b & 63]; + j = 0; + break; + } + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (j) { + chunk[i++] = this.b64[t]; + chunk[i++] = 61; + if (j === 1) + chunk[i++] = 61; + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); + }; + + + /** + * Decodes a base64 encoded string to a buffer. + * @param {string} string Source string + * @param {DataView} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Number of bytes written + * @throws {Error} If encoding is invalid + */ + write(string: string, buffer: DataView, offset: number): number { + var start = offset; + var j = 0, // goto index + t; // temporary + for (var i = 0; i < string.length;) { + var c = string.charCodeAt(i++); + if (c === 61 && j > 1) + break; + if ((c = this.s64[c]) === undefined) + throw Error(this.invalidEncoding); + switch (j) { + case 0: + t = c; + j = 1; + break; + case 1: + buffer.setUint8(offset++, t << 2 | (c & 48) >> 4); + t = c; + j = 2; + break; + case 2: + buffer.setUint8(offset++, (t & 15) << 4 | (c & 60) >> 2); + t = c; + j = 3; + break; + case 3: + buffer.setUint8(offset++, (t & 3) << 6 | c); + j = 0; + break; + } + } + if (j === 1) + throw Error(this.invalidEncoding); + return offset - start; + }; +} + +const base64 = new Base64(); + + +/** +* A minimal UTF8 implementation for number arrays. +* @memberof util +* @namespace +*/ +class UTF8 { + /** + * Calculates the UTF8 byte length of a string. + */ + length(string: string): number { + var len = 0, + c = 0; + for (var i = 0; i < string.length; ++i) { + c = string.charCodeAt(i); + if (c < 128) + len += 1; + else if (c < 2048) + len += 2; + else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { + ++i; + len += 4; + } else + len += 3; + } + return len; + }; + + /** + * Reads UTF8 bytes as a string. + */ + read(buffer: DataView, start: number, end: number): string { + var len = end - start; + if (len < 1) + return ""; + var parts = null, + chunk = [], + i = 0, // char offset + t; // temporary + while (start < end) { + t = buffer.getUint8(start++); + if (t < 128) + chunk[i++] = t; + else if (t > 191 && t < 224) + chunk[i++] = (t & 31) << 6 | buffer.getUint8(start++) & 63; + else if (t > 239 && t < 365) { + t = ((t & 7) << 18 | (buffer.getUint8(start++) & 63) << 12 | (buffer.getUint8(start++) & 63) << 6 | buffer.getUint8(start++) & 63) - 0x10000; + chunk[i++] = 0xD800 + (t >> 10); + chunk[i++] = 0xDC00 + (t & 1023); + } else + chunk[i++] = (t & 15) << 12 | (buffer.getUint8(start++) & 63) << 6 | buffer.getUint8(start++) & 63; + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); + }; + + /** + * Writes a string as UTF8 bytes. + */ + write(string: string, buffer: DataView, offset: number): number { + var start = offset, + c1, // character 1 + c2; // character 2 + for (var i = 0; i < string.length; ++i) { + c1 = string.charCodeAt(i); + if (c1 < 128) { + buffer.setUint8(offset++, c1); + } else if (c1 < 2048) { + buffer.setUint8(offset++, c1 >> 6 | 192); + buffer.setUint8(offset++, c1 & 63 | 128); + } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { + c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); + ++i; + buffer.setUint8(offset++, c1 >> 18 | 240); + buffer.setUint8(offset++, c1 >> 12 & 63 | 128); + buffer.setUint8(offset++, c1 >> 6 & 63 | 128); + buffer.setUint8(offset++, c1 & 63 | 128); + } else { + buffer.setUint8(offset++, c1 >> 12 | 224); + buffer.setUint8(offset++, c1 >> 6 & 63 | 128); + buffer.setUint8(offset++, c1 & 63 | 128); + } + } + return offset - start; + }; +} + +const utf8 = new UTF8(); + +class Encode { + private buffer: ArrayBuffer = null; + private view: DataView = null; + private index: number = 0; + + constructor(length: number) { + this.buffer = new ArrayBuffer(length) + this.view = new DataView(this.buffer); + this.index = 0; + } + + Int8(data: number) { + if (!isNumber(data)) data = 0; + return this.view.setInt8(this.index++, data); + } + + Uint8(data: number) { + if (!isNumber(data)) data = 0; + return this.view.setUint8(this.index++, data); + } + + Int16(data: number) { + if (!isNumber(data)) data = 0; + var value = this.view.setInt16(this.index, data); + this.index += 2; + return value; + } + + Uint16(data: number) { + if (!isNumber(data)) data = 0; + var value = this.view.setUint16(this.index, data); + this.index += 2; + return value; + } + + Int32(data: number) { + if (!isNumber(data)) data = 0; + var value = this.view.setInt32(this.index, data); + this.index += 4; + return value; + } + + Uint32(data: number) { + if (!isNumber(data)) data = 0; + var value = this.view.setUint32(this.index, data); + this.index += 4; + return value; + } + + Float32(data: number) { + if (!isNumber(data)) data = 0; + var value = this.view.setFloat32(this.index, data); + this.index += 4; + return value; + } + + Float64(data: number) { + if (!isNumber(data)) data = 0; + var value = this.view.setFloat64(this.index, data); + this.index += 8; + return value; + } + + Boolean(data) { + return this.Uint8(data ? 1 : 0); + } + + String(string) { + if (!isString(string)) string = ''; + + const len = utf8.write(string, this.view, this.index + 2); + this.Uint16(len); + this.index += len; + } + + Base64(string) { + if (!isBase64(string)) string = ''; + + const len = base64.write(string, this.view, this.index + 2); + this.Uint16(len); + this.index += len; + } + + Array(array) { + if (isArray(array) && !isEmpty(array)) { + return this.String(JSON.stringify(array)); + } else { + return this.String(''); + } + } + + Object(obj) { + if (isMap(obj) && !isEmpty(obj)) { + return this.String(JSON.stringify(obj)); + } else { + return this.String(''); + } + } + + Buffer() { + return this.buffer; + } +} + +class Decode { + private view: DataView = null; + private index: number = 0; + + constructor(buffer: ArrayBuffer) { + this.view = new DataView(buffer); + this.index = 0; + } + + Int8() { + return this.view.getInt8(this.index++); + } + + Uint8() { + return this.view.getUint8(this.index++); + } + + Int16() { + const value = this.view.getInt16(this.index); + this.index += 2; + return value; + } + + Uint16() { + const value = this.view.getUint16(this.index); + this.index += 2; + return value; + } + + Int32() { + const value = this.view.getInt32(this.index); + this.index += 4; + return value; + } + + Uint32() { + const value = this.view.getUint32(this.index); + this.index += 4; + return value; + } + + Float32() { + const value = this.view.getFloat32(this.index); + this.index += 4; + return value; + } + + Float64() { + const value = this.view.getFloat64(this.index); + this.index += 8; + return value; + } + + Boolean() { + return !!this.Uint8(); + } + + String() { + const len = this.Uint16(); + this.index += len; + return utf8.read(this.view, this.index - len, this.index); + } + + Base64() { + const len = this.Uint16(); + this.index += len; + return base64.read(this.view, this.index - len, this.index); + } + + Array() { + const str = this.String(); + return str ? JSON.parse(str) : []; + } + + Object() { + const str = this.String(); + return str ? JSON.parse(str) : {}; + } +} + +const getType = function (param) { + return Object.prototype.toString.call(param).slice(8, -1).toLowerCase(); +} + +const isObject = function (param) { + return param && typeof param === 'object'; +} + +const isArray = function (param) { + return getType(param) === 'array'; +} + +const isMap = function (param) { + return getType(param) === 'object'; +} + +const isString = function (param) { + return getType(param) === 'string'; +} + +const isNumber = function (param) { + return getType(param) === 'number'; +} + +const isBoolean = function (param) { + return getType(param) === 'boolean'; +} + +const isBase64 = function (param) { + return isString(param) && /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(param); +} + +function stringStartsWith(str1: string, str2: string) { + if (str1 === str2) { + return true; + } + for (let index = 0; index < str2.length; index++) { + if (str1[index] !== str2[index]) { + return false; + } + } + return true; +} + +function isEmpty(obj) { + if (isArray(obj)) { + return !obj.length; + } else if (isMap(obj)) { + for (const key in obj) { + return false; + } + } + return true; +} + +function compareStr(str1: string, str2: string) { + if (str1 === str2) { + return 0; + } + if (str1.length > str2.length) { + return 1; + } + if (str1.length < str2.length) { + return -1; + } + + for (let i = 0, code1 = 0, code2 = 0; i < str1.length; i++) { + if (str2.length <= i) { + return 1; + } else { + code1 = str1.charCodeAt(i); + code2 = str2.charCodeAt(i); + if (code1 > code2) { + return 1; + } else if (code1 < code2) { + return -1; + } + } + } + return 0; +} + +function sortKeys(obj) { + if (isMap(obj)) { + let index = 0; + const keys: string[] = []; + for (const key in obj) { + for (index = keys.length - 1; index >= 0; index--) { + if (compareStr(key, keys[index]) >= 0) { + break; + } + } + if (index === keys.length - 1) { + keys.push(key); + } else { + keys.splice(index + 1, 0, key); + } + } + return keys; + } else if (isArray(obj)) { + return obj.map(function (v, k) { + return k; + }) + } + + return []; +} + +function realType(type) { + if (isObject(type)) { + return type; + } + return protoCache[type] || type; +} + +const singleArrayPrefix = 'SingleArray'; + +function isSingleArray(str: string) { + return isString(str) && stringStartsWith(str, singleArrayPrefix); +} + +function SingleArrayProto(str: string) { + const stringify = str.slice(singleArrayPrefix.length + 1, -1); + return JSON.parse(stringify); +} + +/** +* 标记单一类型的数组 +* @param proto +*/ +export const singleArray = function (proto) { + return `${singleArrayPrefix}(${JSON.stringify(proto)})`; +} + +function DataLen(data: any, proto: any) { + proto = realType(proto); + + let length = 0; + if (isMap(proto)) { + if (!isMap(data)) data = {}; + for (const key in proto) { + length += DataLen(data[key], proto[key]); + } + } else if (isArray(proto)) { + if (!isArray(data)) data = []; + proto.forEach(function (type, index) { + length += DataLen(data[index], type); + }) + } else if (proto === 'String') { + // 如果是String的话,固定开头有2字节记录字符串长度 + length += 2; + if (isString(data)) length += utf8.length(data); + } else if (proto === 'Object' || proto === 'Array') { + // Object和Array类型也会将数据通过JSON.stringify转成String格式 + length += 2; + if (!isEmpty(data)) length += utf8.length(JSON.stringify(data)); + } else if (proto === 'Base64') { + // 如果是Base64的话,固定开头有2字节记录字符串长度 + length += 2; + if (isBase64(data)) length += base64.length(data); + } else if (isSingleArray(proto)) { + // 如果是SingleArray的话,固定开头有2字节记录数组长度 + length += 2; + if (!isArray(data)) data = []; + proto = realType(SingleArrayProto(proto)); + data.forEach(function (value) { + length += DataLen(value, proto); + }) + } else if (TypeByte[proto]) { + length += TypeByte[proto]; + } else { + throw new Error("'proto' is bad"); + } + + return length; +} + +function encodeData(encode: Encode, data: any, proto: any) { + proto = realType(proto); + + if (isMap(proto)) { + if (!isMap(data)) data = {}; + sortKeys(proto).forEach(function (key) { + encodeData(encode, data[key], proto[key]); + }) + } else if (isArray(proto)) { + if (!isArray(data)) data = []; + proto.forEach(function (type, index) { + encodeData(encode, data[index], type); + }) + } else if (isSingleArray(proto)) { + if (!isArray(data)) data = []; + encode.Uint16(data.length); + proto = realType(SingleArrayProto(proto)); + data.forEach(function (value) { + encodeData(encode, value, proto); + }) + } else { + encode[proto](data); + } +} + +function decodeData(decode: Decode, proto: any) { + proto = realType(proto); + + if (isMap(proto)) { + const obj = {}; + sortKeys(proto).forEach(function (key) { + obj[key] = decodeData(decode, proto[key]); + }); + return obj; + } else if (isArray(proto)) { + return proto.map(function (type) { + return decodeData(decode, type); + }); + } else if (isSingleArray(proto)) { + const arr = []; + const len = decode.Uint16(); + proto = realType(SingleArrayProto(proto)); + for (let index = 0; index < len; index++) { + arr.push(decodeData(decode, proto)); + } + return arr; + } else { + return decode[proto](); + } +} + +const TypeByte = { + 'Int8': 1, + 'Uint8': 1, + 'Int16': 2, + 'Uint16': 2, + 'Int32': 4, + 'Uint32': 4, + 'Float32': 4, + 'Float64': 8, + 'BigInt64': 8, + 'BigUint64': 8, + 'Boolean': 1, + 'String': 1, + 'Base64': 1, + 'Array': 1, + 'Object': 1 +} + +export const Type = { + 'Int8': 'Int8', // 1byte -128 to 127 + 'Uint8': 'Uint8', // 1byte 0 to 255 + 'Uint8Clamped': 'Uint8', // 1byte 0 to 255 + 'Int16': 'Int16', // 2byte -32768 to 32767 + 'Uint16': 'Uint16', // 2byte 0 to 65535 + 'Int32': 'Int32', // 4byte -2147483648 to 2147483647 + 'Uint32': 'Uint32', // 4byte 0 to 4294967295 + 'Float32': 'Float32', // 4byte 1.2x10^-38 to 3.4x10^38 + 'Float64': 'Float64', // 8byte 5.0x10^-324 to 1.8x10^308 + 'BigInt64': 'BigInt64', // 8byte -2^63 to (2^63)-1 + 'BigUint64': 'BigUint64', // 8byte 0 to (2^64)-1 + 'Boolean': 'Boolean', // 1byte 0 to 255 + 'String': 'String', // 1byte 0 to 255 + 'Base64': 'Base64', // 1byte 0 to 255 + 'Array': 'Array', // 1byte 0 to 255 + 'Object': 'Object' // 1byte 0 to 255 +} + +/** +* 序列化 +* 开头2字节用来存储proto的id +*/ +export const encode = function (obj: Object, id: number | string) { + const proto = protoCache[id]; + if (proto) { + const len = DataLen(obj, proto); + const encode = new Encode(len + 2); + encode.Uint16(Number(id)); + encodeData(encode, obj, proto); + return encode.Buffer(); + } else { + throw new Error("encode error: 'id' is bad"); + } +} + +/** +* 反序列化 +* 开头2字节代表proto的id +*/ +export const decode = function (buffer: ArrayBuffer) { + const decode = new Decode(buffer); + const id = decode.Uint16(); + const proto = protoCache[id]; + if (proto) { + return decodeData(decode, proto); + } else { + throw new Error("decode error: 'buffer' is bad"); + } +} + +/** +* proto缓存 +*/ +const protoCache = {} + +/** +* 注册proto +* id: 必须是个正整数(或正整数字符串), 取值范围[0,65535] +*/ +export const registerProto = function (id: number | string, proto: any) { + if (typeof id === 'string') id = Number(id); + + if (isNumber(id) && Math.floor(id) === id && id >= 0 && id <= 65535 && !Type[id]) { + protoCache[id] = proto; + } else { + throw new Error("registerProto error: 'id' is bad"); + } +} + +export const registerProtoMap = function (protoMap: any) { + if (isMap(protoMap)) { + for (const id in protoMap) { + registerProto(id, protoMap[id]); + } + } else { + throw new Error("registerProtoMap error: 'protoMap' is bad"); + } +} + +export const protoToJson = function () { + return JSON.stringify(protoCache); +} \ No newline at end of file diff --git a/server/src/eMath.ts b/server/src/eMath.ts new file mode 100644 index 0000000..b7d324f --- /dev/null +++ b/server/src/eMath.ts @@ -0,0 +1,402 @@ +/** + * @author zp + */ +/** + * 多平台一致精确计算库,比decimal更轻量更快 + * [Math.round、Math.min、Math.max,Math.floor、Math.ceil,这些系统方法一般情况下是可以放心使用的] + */ + const exactMath = Object.create(null); + module.exports = exactMath; + + // 计算精度 + // sin、cos、tan方法的误差小数点后16位 + const ACCURACY_SIN_ERROR = 1e-16; + const ACCURACY_COS_ERROR = 1e-16; + const ACCURACY_TAN_ERROR = 1e-16; + + // 角度弧度常量 + const DEG = 57.29577951308232; + const RAD = 0.017453292519943295; + + // 系统常量 + exactMath.PI = 3.141592653589793; + exactMath.E = 2.718281828459045; + exactMath.LN2 = 0.6931471805599453; + exactMath.LN10 = 2.302585092994046; + exactMath.LOG2E = 1.4426950408889634; + exactMath.LOG10E = 0.4342944819032518; + exactMath.SQRT1_2 = 0.7071067811865476; + exactMath.SQRT2 = 1.4142135623730951; + + /** + * 链式调用 + * @example + * const value = exactMath.value(10).add(20.123).mul(2).sqrt().value; + */ + let chain = null; + exactMath.value = function (value) { + if (!chain) { + chain = { + value: 0, + valueOf() { return this.value; }, + toString() { return String(this.value); } + } + for (const key in exactMath) { + if (key !== 'value' && typeof exactMath[key] === 'function') { + chain[key] = function (...args) { + this.value = exactMath[key].call(exactMath, this.value, ...args); + return this; + } + } + } + } + + chain.value = value; + return chain; + } + + /****************************************************基础****************************************************/ + /** + * 获得小数位数 + * @param {Number} num 浮点数 + * @returns {Number} + */ + exactMath.getDecimalPlace = function (num) { + if (num && num !== Math.floor(num)) { + for (let n = 1, m = 10, temp = 0; n < 20; n += 1, m *= 10) { + temp = num * m; + if (temp == Math.floor(temp)) return n; + } + return 20; + } else { + return 0; + } + } + /** + * 保留n为小数,并四舍五入 + * @example + * (2.335).toFixed(2) + * exactMath.toFixed(2.335, 2) + * @param {Number} num 浮点数 + * @param {Number} n 整数 + * @returns {Number} + */ + exactMath.toFixed = function (num, n = 0) { + if (n == 0) { + return Math.round(num); + } else { + const m = Math.pow(10, n); + return Math.round(num * (m * 10) / 10) / m; + } + } + + exactMath.abs = function (x) { + return Math.abs(x); + } + exactMath.round = function (x) { + return Math.round(x); + } + exactMath.ceil = function (x) { + return Math.ceil(x) + } + exactMath.floor = function (x) { + return Math.floor(x) + } + exactMath.min = function (...args) { + return Math.min(...args); + } + exactMath.max = function (...args) { + return Math.max(...args); + } + + /** + * 小数相加 + * @param {Number} num1 浮点数 + * @param {Number} num2 浮点数 + * @returns {Number} + */ + exactMath.add = function (...args) { + if (args.length === 2) { + const num1 = args[0]; + const num2 = args[1]; + const m = Math.pow(10, Math.max(this.getDecimalPlace(num1), this.getDecimalPlace(num2))); + return (this.toFixed(num1 * m) + this.toFixed(num2 * m)) / m; + } else { + return args.reduce((a, b) => this.add(a, b)) + } + }; + /** + * 小数相减 + * @param {Number} num1 浮点数 + * @param {Number} num2 浮点数 + * @returns {Number} + */ + exactMath.sub = function (...args) { + if (args.length === 2) { + const num1 = args[0]; + const num2 = args[1]; + const m = Math.pow(10, Math.max(this.getDecimalPlace(num1), this.getDecimalPlace(num2))); + + return (this.toFixed(num1 * m) - this.toFixed(num2 * m)) / m; + } else { + return args.reduce((a, b) => this.sub(a, b)) + } + }; + /** + * 小数相乘 + * @param {Number} num1 浮点数 + * @param {Number} num2 浮点数 + * @returns {Number} + */ + exactMath.mul = function (...args) { + if (args.length === 2) { + let num1 = args[0]; + let num2 = args[1]; + + // 方案1: + // 直接相乘,但是相乘两数小数点过多会导致中间值[(n1 * m1) * (n2 * m2)]过大 + // const n1 = this.getDecimalPlace(num1); + // const n2 = this.getDecimalPlace(num2); + // const m1 = Math.pow(10, n1); + // const m2 = Math.pow(10, n2); + // return (n1 * m1) * (n2 * m2) / (m1 * m2); + + // 方案2: + // 用除法实现乘法,不会存在过大中间值 + let n1 = this.getDecimalPlace(num1); + let n2 = this.getDecimalPlace(num2); + + let m = Math.pow(10, n2); + num2 = m / this.toFixed(num2 * m); + + m = Math.pow(10, Math.max(n1, this.getDecimalPlace(num2))); + m = this.toFixed(num1 * m) / this.toFixed(num2 * m); + + let n = Math.min(this.getDecimalPlace(m), n1 + n2); + return this.toFixed(m, n); + } else { + return args.reduce((a, b) => this.mul(a, b)) + } + }; + /** + * 小数相除法 + * @param {Number} num1 浮点数 + * @param {Number} num2 浮点数 + * @returns {Number} + */ + exactMath.div = function (...args) { + if (args.length === 2) { + const num1 = args[0]; + const num2 = args[1]; + + const m = Math.pow(10, Math.max(this.getDecimalPlace(num1), this.getDecimalPlace(num2))); + return this.toFixed(num1 * m) / this.toFixed(num2 * m); + } else { + return args.reduce((a, b) => this.div(a, b)) + } + }; + /** + * 取余 + * @param {Number} num1 浮点数 + * @param {Number} num2 浮点数 + * @returns {Number} + */ + exactMath.rem = function (...args) { + if (args.length === 2) { + const num1 = args[0]; + const num2 = args[1]; + const m = Math.pow(10, Math.max(this.getDecimalPlace(num1), this.getDecimalPlace(num2))); + + return this.toFixed(num1 * m) % this.toFixed(num2 * m) / m; + } else { + return args.reduce((a, b) => this.rem(a, b)) + } + }; + + /** + * n次方,仅支持整数次方(正负都可以) + * @param {Number} num 浮点数 + * @param {Number} n 整数 + */ + exactMath.pow = function (num, n) { + if (num == 0 && n == 0) { + return 1; + } + if (num == 0 && n > 0) { + return 0 + } + if (num == 0 && n < 0) { + return Infinity; + } + // num为负数,n为负小数,返回NaN + if (num < 0 && n < 0 && Math.round(n) != n) { + return NaN; + } + + if (Math.round(n) != n) { + throw new Error('n must be an integer'); + } + + let result = 1; + + if (n > 0) { + for (let index = 0; index < n; index++) { + result = this.mul(result, num); + } + } else if (n < 0) { + for (let index = 0, len = Math.abs(n); index < len; index++) { + result = this.div(result, num); + } + } + + return result; + }; + /** + * 开方运算【牛顿迭代法】 + * + * @param {Number} n + * @returns + */ + exactMath.sqrt = function (n) { + if (n < 0) return NaN; + if (n === 0) return 0; + if (n === 1) return 1; + let last = 0; + let res = 1; + let c = 50; + while (res != last && --c >= 0) { + last = res; + res = this.div(this.add(res, this.div(n, res)), 2) + } + return res; + + // float InvSqrt(float x) + // { + // float xhalf = 0.5f * x; + // int i = * (int *) & x; // get bits for floating VALUE + // i = 0x5f375a86 - (i >> 1); // gives initial guess y0 + // x = * (float *) & i; // convert bits BACK to float + // x = x * (1.5f - xhalf * x * x); // Newton step, repeating increases accuracy + // x = x * (1.5f - xhalf * x * x); // Newton step, repeating increases accuracy + // x = x * (1.5f - xhalf * x * x); // Newton step, repeating increases accuracy + // return 1 / x; + // } + }; + + /****************************************************随机****************************************************/ + function getSeed(seed) { + if (isNaN(seed)) { + seed = Math.floor(Math.random() * 233280); + } else { + seed = Math.floor(seed % 233280); + } + return seed; + } + + let randomSeed = getSeed(); + + /** + * 设置随机种子 + */ + exactMath.setSeed = function (seed) { + randomSeed = getSeed(seed); + }; + + /** + * 随机 + */ + exactMath.random = function () { + randomSeed = (randomSeed * 9301 + 49297) % 233280; + return randomSeed / 233280.0; + }; + + /** + * 根据随机种子随机 + * @param {number} seed + */ + exactMath.randomBySeed = function (seed) { + seed = getSeed(seed); + seed = (seed * 9301 + 49297) % 233280; + return seed / 233280.0; + }; + + /****************************************************角度弧度转换****************************************************/ + /** + * 弧度数转角度数 + * @param {Number} radians 浮点数 + * @returns {Numbe} 浮点数 + */ + exactMath.radiansToDegrees = function (radians) { + return this.div(radians, RAD); + }; + /** + * 角度数转弧度数 + * @param {Number} degrees 浮点数 + * @returns {Numbe} 浮点数 + */ + exactMath.degreesToRadians = function (degrees) { + return this.div(degrees, DEG); + }; + /** + * 将角度值转换到[0, 360)范围内 + * @param {Number} angle 浮点数 + * @returns {Number} 整数 + */ + exactMath.get0To360Angle = function (angle) { + if (angle === 0) { + return 0; + } else if (angle < 0) { + return this.add(this.rem(angle, 360), 360); + } else { + return this.rem(angle, 360); + } + }; + /****************************************************三角函数****************************************************/ + /** + * 查表 + */ + exactMath._sin = {}; + exactMath._cos = {}; + exactMath._tan = {}; + + /** + * 3个三角函数,根据需求自行添加 + * 为了效率,应该尽量使用查表法 + * 表内查不到的,目前使用系统方法的结果并取前4位小数 + */ + exactMath.sin = function (x) { + if (this._sin.hasOwnProperty(x)) { + return this._sin[x]; + } + + // if (x == 0) { + // return 0; + // } else if (x == 90) { + // return 1; + // } + + // let n = x, sum = 0, i = 1; + // do { + // i++; + // sum = this.add(sum, n); + // // n = -n * x * x / (2 * i - 1) / (2 * i - 2); + // n = this.div(this.mul(-1, n, x, x), this.sub(this.mul(2, i), 1), this.sub(this.mul(2, i), 2)); + // } while (Math.abs(n) >= ACCURACY_SIN_ERROR); + // return sum; + + return this.toFixed(Math.sin(x), 4); + }; + exactMath.cos = function (x) { + if (this._cos.hasOwnProperty(x)) { + return this._cos[x]; + } + + return this.toFixed(Math.cos(x), 4); + }; + exactMath.tan = function (x) { + if (this._tan.hasOwnProperty(x)) { + return this._tan[x]; + } + + return this.toFixed(Math.tan(x), 4); + }; \ No newline at end of file diff --git a/server/src/index.ts b/server/src/index.ts new file mode 100644 index 0000000..b9d2d09 --- /dev/null +++ b/server/src/index.ts @@ -0,0 +1,48 @@ +import { WebSocketServer } from 'ws'; +import express from 'express' +import http from 'http' +import cors from 'cors' + +const app = express() +app.use(cors()) + +app.get("/join", (req, res) => { + + res.send([{ a: 1 }]) +}) + +const server = http.createServer(app) + +const wss = new WebSocketServer({ server }); + +wss.on('connection', function connection(socket) { + socket.on('message', function message(data) { + console.log('received: %s', data); + }); + + socket.on("close", () => { + console.log("socket close"); + }) + + socket.on("error", () => { + console.log("socket error"); + }) + + socket.send('something'); +}); + +wss.on("error", () => { + console.log("服务错误"); +}) + +wss.on("close", () => { + console.log("服务关闭"); +}) + +wss.on("listening", () => { + console.log("ws服务启动"); +}) + +server.listen(8888, () => { + console.log("http服务启动"); +}) \ No newline at end of file diff --git a/server/tsconfig.json b/server/tsconfig.json new file mode 100644 index 0000000..75dcaea --- /dev/null +++ b/server/tsconfig.json @@ -0,0 +1,103 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +}