"use strict"; cc._RF.push(module, 'af8ceFJXDhJAKOZMpr2SeT/', 'cmp.battledrama.wnd'); // Scripts/mod/battle_drama/cmp/form/cmp.battledrama.wnd.js "use strict"; var BridgeWindow = require("bridge.window"); var BattleDramaEvent = require("battle_drama_event"); cc.Class({ "extends": BridgeWindow, properties: { win: { "default": null, type: cc.Node } }, // LIFE-CYCLE CALLBACKS: onLoad: function onLoad() { this.bindGEvent(BattleDramaEvent.AbnormalShutDownForm, this.FocusClosed.bind(this)); }, start: function start() {}, FocusClosed: function FocusClosed() { this.delayClose(); }, // 重载:关闭前 onPreClosed: function onPreClosed() {}, onOpenConfigs: function onOpenConfigs(params) { var _this = this; if (nx.dt.objEmpty(params)) { return this.delayClose(); } this.scheduleOnce(function () { _this.loadForm(params); }, 0.1); }, loadForm: function loadForm(params) { var _this2 = this; nx.res.loadPrefab("prefab/battle/battledrama/wnd_battledrama_form", function (_err, _data) { if (_err) { return; } var node = cc.instantiate(_data); var cmp = node.getComponent("cmp.battledrama.form"); node.parent = _this2.win; if (cmp && cmp.initConfigs) { cmp.initConfigs(params); } }); } // update (dt) {}, }); cc._RF.pop();