AlertToBeContinueImpl.ts
1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { DummyNode } from "../../../../common/CCDummyObjects";
import { UIManager } from "../../../../common/gameplay/managers/UIManager";
import { AnimationUtils } from "../../../../common/utils/AnimationUtils";
import CCGameCenterNodeFactory from "../../../../cooperation/script/CCGameCenterNodeFactory";
import { GameConfig } from "../../../../GameConfig";
import { GameModelManager } from "../../../model/GameModelManager";
const { ccclass, property } = cc._decorator
@ccclass
export class AlertToBeContinueImpl extends cc.Component {
@property(cc.Node)
momentNode: cc.Node = DummyNode;
onLoad() {
this.momentNode.addChild(CCGameCenterNodeFactory.getInstance().getMomentNode()!);
}
//#region editor bindings
closeAction() {
// this.node.destroy();
AnimationUtils.hideUIAnim(this.node, this.node.getChildByName("mainNode"), {
callback: () => {
this.node.destroy();
}
}, this.node.getChildByName("BG"))
GameModelManager.checkAutoPopView();
}
//#endregion
}
export async function showToBeContinue() {
if (!GameConfig.showToBeContinue) {
GameConfig.showToBeContinue = true;
await UIManager.showAlert("prefab/ui/ToBeContinue");
// GameDotMgr.getInstance().dotExposure(ExposureType.Continue);
}
}