|
@@ -1,5 +1,4 @@
|
|
import { isValid, Label, tween, v3, Vec3, Node, Tween } from "cc";
|
|
import { isValid, Label, tween, v3, Vec3, Node, Tween } from "cc";
|
|
-import { EventDispatcher } from "../../../../core_tgx/easy_ui_framework/EventDispatcher";
|
|
|
|
import { tgxModuleContext } from "../../../../core_tgx/tgx";
|
|
import { tgxModuleContext } from "../../../../core_tgx/tgx";
|
|
import { GameUILayers } from "../../../../scripts/GameUILayers";
|
|
import { GameUILayers } from "../../../../scripts/GameUILayers";
|
|
import { UI_BattleResult } from "../../../../scripts/UIDef";
|
|
import { UI_BattleResult } from "../../../../scripts/UIDef";
|
|
@@ -7,7 +6,7 @@ import { Layout_BattleResult } from "./Layout_BattleResult";
|
|
import { GtagMgr, GtagType } from "db://assets/core_tgx/base/GtagMgr";
|
|
import { GtagMgr, GtagType } from "db://assets/core_tgx/base/GtagMgr";
|
|
import { GameEvent } from "../../../Script/Enum/GameEvent";
|
|
import { GameEvent } from "../../../Script/Enum/GameEvent";
|
|
import { StormSunderAudioMgr } from "../../../Script/Manager/StormSunderAudioMgr";
|
|
import { StormSunderAudioMgr } from "../../../Script/Manager/StormSunderAudioMgr";
|
|
-import { GameMgr } from "../../../Script/Manager/GameMgr";
|
|
|
|
|
|
+import { GameMgr, GameStatus } from "../../../Script/Manager/GameMgr";
|
|
|
|
|
|
export class UI_BattleResult_Impl extends UI_BattleResult {
|
|
export class UI_BattleResult_Impl extends UI_BattleResult {
|
|
timeoutIds: Array<number> = [];
|
|
timeoutIds: Array<number> = [];
|
|
@@ -23,7 +22,7 @@ export class UI_BattleResult_Impl extends UI_BattleResult {
|
|
|
|
|
|
protected onCreated(): void {
|
|
protected onCreated(): void {
|
|
this.win = GameMgr.inst.isWin;
|
|
this.win = GameMgr.inst.isWin;
|
|
- const soundId = this.win ? 7 : 8;
|
|
|
|
|
|
+ const soundId = this.win ? 6 : 7;
|
|
StormSunderAudioMgr.playOneShot(StormSunderAudioMgr.getMusicIdName(soundId), 1.0);
|
|
StormSunderAudioMgr.playOneShot(StormSunderAudioMgr.getMusicIdName(soundId), 1.0);
|
|
|
|
|
|
let layout = this.layout as Layout_BattleResult;
|
|
let layout = this.layout as Layout_BattleResult;
|
|
@@ -59,8 +58,10 @@ export class UI_BattleResult_Impl extends UI_BattleResult {
|
|
}
|
|
}
|
|
|
|
|
|
private emitEvent(): void {
|
|
private emitEvent(): void {
|
|
|
|
+ this.node.active = false;
|
|
if (this.win) {
|
|
if (this.win) {
|
|
- EventDispatcher.instance.emit(GameEvent.EVENT_BATTLE_SUCCESS_LEVEL_UP);
|
|
|
|
|
|
+ } else {
|
|
|
|
+ GameMgr.inst.setGameStatus(GameStatus.Playing);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|