44b2dcaf-3655-48c7-9fe9-9d1b11e5d257.js 2.78 KB
"use strict";
cc._RF.push(module, '44b2dyvNlVIx5/pnRsR5dJX', 'AlertToBeContinueImpl');
// script/game/ui/view/impl/AlertToBeContinueImpl.ts

"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.showToBeContinue = exports.AlertToBeContinueImpl = void 0;
const CCDummyObjects_1 = require("../../../../common/CCDummyObjects");
const UIManager_1 = require("../../../../common/gameplay/managers/UIManager");
const AnimationUtils_1 = require("../../../../common/utils/AnimationUtils");
const CCGameCenterNodeFactory_1 = require("../../../../cooperation/script/CCGameCenterNodeFactory");
const GameConfig_1 = require("../../../../GameConfig");
const GameModelManager_1 = require("../../../model/GameModelManager");
const { ccclass, property } = cc._decorator;
let AlertToBeContinueImpl = /** @class */ (() => {
    let AlertToBeContinueImpl = class AlertToBeContinueImpl extends cc.Component {
        constructor() {
            super(...arguments);
            this.momentNode = CCDummyObjects_1.DummyNode;
            //#endregion
        }
        onLoad() {
            this.momentNode.addChild(CCGameCenterNodeFactory_1.default.getInstance().getMomentNode());
        }
        //#region editor bindings
        closeAction() {
            // this.node.destroy();
            AnimationUtils_1.AnimationUtils.hideUIAnim(this.node, this.node.getChildByName("mainNode"), {
                callback: () => {
                    this.node.destroy();
                }
            }, this.node.getChildByName("BG"));
            GameModelManager_1.GameModelManager.checkAutoPopView();
        }
    };
    __decorate([
        property(cc.Node)
    ], AlertToBeContinueImpl.prototype, "momentNode", void 0);
    AlertToBeContinueImpl = __decorate([
        ccclass
    ], AlertToBeContinueImpl);
    return AlertToBeContinueImpl;
})();
exports.AlertToBeContinueImpl = AlertToBeContinueImpl;
async function showToBeContinue() {
    if (!GameConfig_1.GameConfig.showToBeContinue) {
        GameConfig_1.GameConfig.showToBeContinue = true;
        await UIManager_1.UIManager.showAlert("prefab/ui/ToBeContinue");
        // GameDotMgr.getInstance().dotExposure(ExposureType.Continue);
    }
}
exports.showToBeContinue = showToBeContinue;

cc._RF.pop();