Kaynağa Gözat

effect2dUI reset

woso_javan 2 ay önce
ebeveyn
işleme
ad6d09ecfe

+ 1 - 1
assets/module_storm_sunder/Prefabs/Storm.prefab

@@ -3295,7 +3295,7 @@
       "y": 0,
       "z": 0
     },
-    "_radius": 3,
+    "_radius": 5,
     "_height": 2,
     "_direction": 1,
     "_id": ""

+ 5 - 1
assets/module_storm_sunder/Prefabs/UI/Revive/UI_BattleRevive_Impl.ts

@@ -21,9 +21,13 @@ export class UI_BattleRevive_Impl extends UI_BattleRevive {
         let layout = this.layout as Layout_BattleRevive;
         this.onButtonEvent(layout.btn_revive, () => {
             this.changeGameStatus(GameStatus.Playing);
+            this.hide();
         });
         this.onButtonEvent(layout.btn_back, () => {
-            this.changeGameStatus(GameStatus.None);
+            // this.changeGameStatus(GameStatus.None);
+            GameMgr.inst.isWin = false;
+            GameMgr.inst.setGameStatus(GameStatus.End);
+            this.hide();
         });
     }
 

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

@@ -51,7 +51,7 @@ export class TornadoAIComponent extends TornadoComponent {
         const { text, range, move_judge, move_time, escape_time, pursuit_1, pursuit_2, pursuit_time } = aiConfig.data;
         this.playerInfo.nickName = text;
         this.nickName = text;
-        this.currentLv = 1;
+        this.currentLv = 11;
         this.playerInfo.level = this.currentLv;
 
         this.moveDuration = Math.floor(move_time[0] + Math.random() * (move_time[1] - move_time[0] + 1));

+ 12 - 0
assets/module_storm_sunder/Script/Manager/Effect2DUIMgr.ts

@@ -204,5 +204,17 @@ export class Effect2DUIMgr {
             this.playerInfoMap.delete(target);
         }
     }
+
+    reset() {
+        this.bloodMap.forEach((v) => {
+            v.destroy();
+        });
+        this.bloodMap.clear();
+
+        this.playerInfoMap.forEach((v) => {
+            v.destroy();
+        });
+        this.playerInfoMap.clear();
+    }
 }
 

+ 2 - 0
assets/module_storm_sunder/Script/Manager/GameMgr.ts

@@ -8,6 +8,7 @@ import { UI_BattleResult, UI_BattleRevive } from "db://assets/scripts/UIDef";
 import { PlayerMgr } from "./PlayerMgr";
 import { assetManager, instantiate, Prefab } from "cc";
 import { resLoader } from "db://assets/core_tgx/base/ResLoader";
+import { Effect2DUIMgr } from "./Effect2DUIMgr";
 
 export class GameMgr {
     private static _instance: GameMgr;
@@ -46,6 +47,7 @@ export class GameMgr {
                 battleUI.active = false;
                 TimerMgr.inst.reset();
                 PropMgr.inst.reset();
+                Effect2DUIMgr.inst.reset();
                 PlayerMgr.inst.reset();
                 break;
             case GameStatus.Playing: