Files
fc/dev/project/library/imports/a9/a9ac3b30-03fb-424c-b5d5-8a9de3932e50.js
T
2026-05-24 10:21:26 +08:00

43 lines
1.1 KiB
JavaScript

"use strict";
cc._RF.push(module, 'a9ac3swA/tCTLXVip3jky5Q', 'cmp.battledrama.plot');
// Scripts/mod/battle_drama/cmp/cmp.battledrama.plot.js
"use strict";
var BridgeComponent = require("bridge.component");
var PlotDefine = require("plot.define");
var RoleController = require("role_controller");
var PPT = PlotDefine.PlotType;
cc.Class({
"extends": BridgeComponent,
properties: {},
// 显示
onLoad: function onLoad() {
// 视图监听
nx.bridge.plot.vbind(this, [["step", this.onStepChanged.bind(this)]]);
// 检查
},
// 关闭
onDestroy: function onDestroy() {
if (window.nx && nx.bridge.plot) {
// 视图解绑
nx.bridge.plot.vunbind(this);
}
},
// 剧情改变
onStepChanged: function onStepChanged(_id) {
console.log("当前的剧情相关" + JSON.stringify(nx.bridge.plot.stepData()));
nx.bridge.closePanel("WndPlotGuide");
var wname = "WndPlotGuide";
if (nx.dt.strNEmpty(wname)) {
if (nx.bridge.popups) {
nx.bridge.popups.clean();
}
nx.bridge.createPanel(wname);
}
}
});
cc._RF.pop();