woso_javan 2 months ago
parent
commit
d68983d0cf

+ 1 - 1
assets/module_storm_sunder/Script/Component/TornadoAIComponent.ts

@@ -129,7 +129,7 @@ export class TornadoAIComponent extends TornadoComponent {
 
             const isPlayer = targetTornado instanceof TornadoComponent;
             if (this.currentLv > targetTornado.currentLv && isPlayer) {
-                // GameMgr.inst.setGameStatus(GameStatus.End);
+                GameMgr.inst.setGameStatus(GameStatus.End);
             }
         }
     }

+ 2 - 2
assets/module_storm_sunder/Script/Manager/PropMgr.ts

@@ -1,4 +1,4 @@
-import { assetManager, instantiate, Prefab, Node, UITransform, Vec3, Vec2, view, game, PhysicsSystem, geometry } from "cc";
+import { assetManager, instantiate, Prefab, Node, UITransform, Vec3, Vec2, view, game, PhysicsSystem, geometry, isValid } from "cc";
 import { resLoader } from "db://assets/core_tgx/base/ResLoader";
 import { StormSunderGlobalInstance } from "../StormSunderGlobalInstance";
 import { TornadoComponent } from "../Component/TornadoComponent";
@@ -102,8 +102,8 @@ export class PropMgr {
         if (!this.tornadoNode) return;
 
         let playerPos = this.tornadoNode.worldPosition;
-        let angle = Math.random() * Math.PI * 2; // 随机角度
 
+        let angle = Math.random() * Math.PI * 2; // 随机角度
         let distance = Math.random() * this.spawnRadius + this.spawnRadius;
         let x = playerPos.x + Math.cos(angle) * distance;
         let z = playerPos.z + Math.sin(angle) * distance;