init
This commit is contained in:
+178
@@ -0,0 +1,178 @@
|
||||
System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4", "__unresolved_5", "__unresolved_6"], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, Button, Label, PanelBase, GameController, UIManager, SdkMgr, AudioMgr, AssetController, _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _class3, _crd, ccclass, property, LosePanel;
|
||||
|
||||
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
||||
|
||||
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
||||
|
||||
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
|
||||
|
||||
function _reportPossibleCrUseOfPanelBase(extras) {
|
||||
_reporterNs.report("PanelBase", "../framework/ui/PanelBase", _context.meta, extras);
|
||||
}
|
||||
|
||||
function _reportPossibleCrUseOfGameController(extras) {
|
||||
_reporterNs.report("GameController", "../GameController", _context.meta, extras);
|
||||
}
|
||||
|
||||
function _reportPossibleCrUseOfUIManager(extras) {
|
||||
_reporterNs.report("UIManager", "../framework/ui/UIManager", _context.meta, extras);
|
||||
}
|
||||
|
||||
function _reportPossibleCrUseOfSdkMgr(extras) {
|
||||
_reporterNs.report("SdkMgr", "../framework/sdk/SdkMgr", _context.meta, extras);
|
||||
}
|
||||
|
||||
function _reportPossibleCrUseOfAudioMgr(extras) {
|
||||
_reporterNs.report("AudioMgr", "../framework/audio/AudioMgr", _context.meta, extras);
|
||||
}
|
||||
|
||||
function _reportPossibleCrUseOfAssetController(extras) {
|
||||
_reporterNs.report("AssetController", "../AssetController", _context.meta, extras);
|
||||
}
|
||||
|
||||
return {
|
||||
setters: [function (_unresolved_) {
|
||||
_reporterNs = _unresolved_;
|
||||
}, function (_cc) {
|
||||
_cclegacy = _cc.cclegacy;
|
||||
__checkObsolete__ = _cc.__checkObsolete__;
|
||||
__checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
|
||||
_decorator = _cc._decorator;
|
||||
Button = _cc.Button;
|
||||
Label = _cc.Label;
|
||||
}, function (_unresolved_2) {
|
||||
PanelBase = _unresolved_2.PanelBase;
|
||||
}, function (_unresolved_3) {
|
||||
GameController = _unresolved_3.GameController;
|
||||
}, function (_unresolved_4) {
|
||||
UIManager = _unresolved_4.UIManager;
|
||||
}, function (_unresolved_5) {
|
||||
SdkMgr = _unresolved_5.SdkMgr;
|
||||
}, function (_unresolved_6) {
|
||||
AudioMgr = _unresolved_6.AudioMgr;
|
||||
}, function (_unresolved_7) {
|
||||
AssetController = _unresolved_7.AssetController;
|
||||
}],
|
||||
execute: function () {
|
||||
_crd = true;
|
||||
|
||||
_cclegacy._RF.push({}, "35c17zpyAxEMJYr9G6tai5z", "LosePanel", undefined);
|
||||
|
||||
__checkObsolete__(['_decorator', 'Button', 'Component', 'EventTouch', 'Input', 'input', 'instantiate', 'Label', 'Node', 'Prefab']);
|
||||
|
||||
({
|
||||
ccclass,
|
||||
property
|
||||
} = _decorator);
|
||||
|
||||
_export("LosePanel", LosePanel = (_dec = ccclass('LosePanel'), _dec2 = property(Button), _dec3 = property(Button), _dec4 = property(Button), _dec5 = property(Label), _dec(_class = (_class2 = (_class3 = class LosePanel extends (_crd && PanelBase === void 0 ? (_reportPossibleCrUseOfPanelBase({
|
||||
error: Error()
|
||||
}), PanelBase) : PanelBase) {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
|
||||
_initializerDefineProperty(this, "closeBtn", _descriptor, this);
|
||||
|
||||
_initializerDefineProperty(this, "replayBtn", _descriptor2, this);
|
||||
|
||||
_initializerDefineProperty(this, "addTimeBtn", _descriptor3, this);
|
||||
|
||||
_initializerDefineProperty(this, "remainLabel", _descriptor4, this);
|
||||
}
|
||||
|
||||
onLoad() {
|
||||
LosePanel.instance = this;
|
||||
this.closeBtn.node.on(Button.EventType.CLICK, this.onClickClose, this);
|
||||
this.replayBtn.node.on(Button.EventType.CLICK, this.onClickReplay, this);
|
||||
this.addTimeBtn.node.on(Button.EventType.CLICK, this.onClickAddTime, this);
|
||||
}
|
||||
|
||||
onClickClose() {
|
||||
(_crd && AudioMgr === void 0 ? (_reportPossibleCrUseOfAudioMgr({
|
||||
error: Error()
|
||||
}), AudioMgr) : AudioMgr).inst.playOneShot((_crd && AssetController === void 0 ? (_reportPossibleCrUseOfAssetController({
|
||||
error: Error()
|
||||
}), AssetController) : AssetController).instance.click);
|
||||
(_crd && GameController === void 0 ? (_reportPossibleCrUseOfGameController({
|
||||
error: Error()
|
||||
}), GameController) : GameController).getInstance().backMain();
|
||||
}
|
||||
|
||||
onClickReplay() {
|
||||
(_crd && AudioMgr === void 0 ? (_reportPossibleCrUseOfAudioMgr({
|
||||
error: Error()
|
||||
}), AudioMgr) : AudioMgr).inst.playOneShot((_crd && AssetController === void 0 ? (_reportPossibleCrUseOfAssetController({
|
||||
error: Error()
|
||||
}), AssetController) : AssetController).instance.click);
|
||||
(_crd && GameController === void 0 ? (_reportPossibleCrUseOfGameController({
|
||||
error: Error()
|
||||
}), GameController) : GameController).getInstance().gameRestart();
|
||||
}
|
||||
|
||||
onClickAddTime() {
|
||||
(_crd && AudioMgr === void 0 ? (_reportPossibleCrUseOfAudioMgr({
|
||||
error: Error()
|
||||
}), AudioMgr) : AudioMgr).inst.playOneShot((_crd && AssetController === void 0 ? (_reportPossibleCrUseOfAssetController({
|
||||
error: Error()
|
||||
}), AssetController) : AssetController).instance.click);
|
||||
(_crd && SdkMgr === void 0 ? (_reportPossibleCrUseOfSdkMgr({
|
||||
error: Error()
|
||||
}), SdkMgr) : SdkMgr).instance.playerRewardAds(() => {
|
||||
(_crd && GameController === void 0 ? (_reportPossibleCrUseOfGameController({
|
||||
error: Error()
|
||||
}), GameController) : GameController).getInstance().curLevel.addTimer();
|
||||
(_crd && GameController === void 0 ? (_reportPossibleCrUseOfGameController({
|
||||
error: Error()
|
||||
}), GameController) : GameController).getInstance().curLevel.ContinueRun();
|
||||
(_crd && UIManager === void 0 ? (_reportPossibleCrUseOfUIManager({
|
||||
error: Error()
|
||||
}), UIManager) : UIManager).instance.closePanel(LosePanel);
|
||||
});
|
||||
}
|
||||
|
||||
onOpen() {
|
||||
LosePanel.instance.remainLabel.string = "剩余: " + (_crd && GameController === void 0 ? (_reportPossibleCrUseOfGameController({
|
||||
error: Error()
|
||||
}), GameController) : GameController).getInstance().curLevel.getAliveEnemeyCount().toString();
|
||||
}
|
||||
|
||||
}, _class3.instance = null, _class3), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "closeBtn", [_dec2], {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
initializer: function () {
|
||||
return null;
|
||||
}
|
||||
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "replayBtn", [_dec3], {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
initializer: function () {
|
||||
return null;
|
||||
}
|
||||
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "addTimeBtn", [_dec4], {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
initializer: function () {
|
||||
return null;
|
||||
}
|
||||
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "remainLabel", [_dec5], {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
initializer: function () {
|
||||
return null;
|
||||
}
|
||||
})), _class2)) || _class));
|
||||
|
||||
_cclegacy._RF.pop();
|
||||
|
||||
_crd = false;
|
||||
}
|
||||
};
|
||||
});
|
||||
//# sourceMappingURL=bace070c537a3e1854e903015145470ccbad65f3.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["file:///D:/Users/admin/Alien_Sniper/assets/scripts/ui/LosePanel.ts"],"names":["_decorator","Button","Label","PanelBase","GameController","UIManager","SdkMgr","AudioMgr","AssetController","ccclass","property","LosePanel","onLoad","instance","closeBtn","node","on","EventType","CLICK","onClickClose","replayBtn","onClickReplay","addTimeBtn","onClickAddTime","inst","playOneShot","click","getInstance","backMain","gameRestart","playerRewardAds","curLevel","addTimer","ContinueRun","closePanel","onOpen","remainLabel","string","getAliveEnemeyCount","toString"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAASA,MAAAA,U,OAAAA,U;AAAYC,MAAAA,M,OAAAA,M;AAA0DC,MAAAA,K,OAAAA,K;;AACtEC,MAAAA,S,iBAAAA,S;;AAEAC,MAAAA,c,iBAAAA,c;;AAGAC,MAAAA,S,iBAAAA,S;;AACAC,MAAAA,M,iBAAAA,M;;AACAC,MAAAA,Q,iBAAAA,Q;;AACAC,MAAAA,e,iBAAAA,e;;;;;;;;;OACH;AAAEC,QAAAA,OAAF;AAAWC,QAAAA;AAAX,O,GAAwBV,U;;2BAGjBW,S,WADZF,OAAO,CAAC,WAAD,C,UAKHC,QAAQ,CAACT,MAAD,C,UAGRS,QAAQ,CAACT,MAAD,C,UAGRS,QAAQ,CAACT,MAAD,C,UAGRS,QAAQ,CAACR,KAAD,C,sCAdb,MACaS,SADb;AAAA;AAAA,kCACyC;AAAA;AAAA;;AAAA;;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ESwB,QAAAA,MAAM,GAAS;AACrBxB,UAAAA,SAAS,CAACE,QAAV,CAAmBuB,WAAnB,CAA+BC,MAA/B,GAAwC,SAAS;AAAA;AAAA,gDAAeV,WAAf,GAA6BI,QAA7B,CAAsCO,mBAAtC,GAA4DC,QAA5D,EAAjD;AACH;;AA3CoC,O,UAE9B1B,Q,GAAsB,I;;;;;iBAGV,I;;;;;;;iBAGC,I;;;;;;;iBAGC,I;;;;;;;iBAGA,I","sourcesContent":["import { _decorator, Button, Component, EventTouch, Input, input, instantiate, Label, Node, Prefab } from 'cc';\r\nimport { PanelBase } from '../framework/ui/PanelBase';\r\nimport { FPSCameraController } from '../FPSCameraController';\r\nimport { GameController } from '../GameController';\r\nimport { TargetIconItem } from './TargetIconItem';\r\nimport { EventCenter } from '../EventCenter';\r\nimport { UIManager } from '../framework/ui/UIManager';\r\nimport { SdkMgr } from '../framework/sdk/SdkMgr';\r\nimport { AudioMgr } from '../framework/audio/AudioMgr';\r\nimport { AssetController } from '../AssetController';\r\nconst { ccclass, property } = _decorator;\r\n\r\n@ccclass('LosePanel')\r\nexport class LosePanel extends PanelBase {\r\n\r\n static instance: LosePanel = null\r\n\r\n @property(Button)\r\n closeBtn: Button = null;\r\n\r\n @property(Button)\r\n replayBtn: Button = null;\r\n\r\n @property(Button)\r\n addTimeBtn: Button = null;\r\n\r\n @property(Label)\r\n remainLabel: Label = null;\r\n\r\n onLoad() {\r\n LosePanel.instance = this\r\n this.closeBtn.node.on(Button.EventType.CLICK, this.onClickClose, this);\r\n this.replayBtn.node.on(Button.EventType.CLICK, this.onClickReplay, this);\r\n this.addTimeBtn.node.on(Button.EventType.CLICK, this.onClickAddTime, this);\r\n }\r\n onClickClose() {\r\n AudioMgr.inst.playOneShot(AssetController.instance.click)\r\n GameController.getInstance().backMain()\r\n }\r\n\r\n onClickReplay() {\r\n AudioMgr.inst.playOneShot(AssetController.instance.click)\r\n GameController.getInstance().gameRestart()\r\n }\r\n\r\n onClickAddTime() {\r\n AudioMgr.inst.playOneShot(AssetController.instance.click)\r\n SdkMgr.instance.playerRewardAds(() => {\r\n GameController.getInstance().curLevel.addTimer()\r\n GameController.getInstance().curLevel.ContinueRun()\r\n UIManager.instance.closePanel(LosePanel)\r\n })\r\n }\r\n\r\n protected onOpen(): void {\r\n LosePanel.instance.remainLabel.string = \"剩余: \" + GameController.getInstance().curLevel.getAliveEnemeyCount().toString()\r\n }\r\n\r\n}\r\n\r\n\r\n"]}
|
||||
Reference in New Issue
Block a user