|
@@ -1,7 +1,7 @@
|
|
|
import { isValid, Label, tween, v3, Vec3, Node, Tween } from "cc";
|
|
|
-import { tgxModuleContext } from "../../../../core_tgx/tgx";
|
|
|
+import { tgxModuleContext, tgxUIMgr } from "../../../../core_tgx/tgx";
|
|
|
import { GameUILayers } from "../../../../scripts/GameUILayers";
|
|
|
-import { UI_BattleResult } from "../../../../scripts/UIDef";
|
|
|
+import { UI_BattleResult, UI_PowerUp } from "../../../../scripts/UIDef";
|
|
|
import { Layout_BattleResult } from "./Layout_BattleResult";
|
|
|
import { GameEvent } from "../../../Script/Enum/GameEvent";
|
|
|
import { LevelManager } from "../../../Script/Manager/LevelMgr";
|
|
@@ -78,7 +78,15 @@ export class UI_BattleResult_Impl extends UI_BattleResult {
|
|
|
if (this.win) {
|
|
|
LevelManager.instance.levelUpHandler();
|
|
|
} else {
|
|
|
- LevelManager.instance.restartLevelHandler();
|
|
|
+ const power = UserManager.instance.reducePower(1);
|
|
|
+ if (!power) {
|
|
|
+ const match = tgxUIMgr.inst.isShowing(UI_PowerUp);
|
|
|
+ if (!match) {
|
|
|
+ tgxUIMgr.inst.showUI(UI_PowerUp);
|
|
|
+ }
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // LevelManager.instance.restartLevelHandler();
|
|
|
}
|
|
|
}
|
|
|
|