Browse Source

重开 出身点调整

woso_javan 2 months ago
parent
commit
7eacdb04c3
1 changed files with 7 additions and 0 deletions
  1. 7 0
      assets/module_storm_sunder/Script/Manager/PlayerMgr.ts

+ 7 - 0
assets/module_storm_sunder/Script/Manager/PlayerMgr.ts

@@ -259,8 +259,15 @@ export class PlayerMgr {
         player.setPosition(aiPoints.children[randomIndex].getWorldPosition());
     }
 
+    //重置到出生点
+    async resetBornPos() {
+        const player = await this.getTornadoNode();
+        player.setPosition(2, 0, 15);
+    }
+
     async reset() {
         this.destroyOtherAI();
+        await this.resetBornPos();
         const sence = director.getScene();
         sence.emit(EasyControllerEvent.CAMERA_ZOOM, 30);
         EventDispatcher.instance.emit(GameEvent.EVENT_STORM_RESET);