Files
fc/dev/project/library/imports/39/39dbb360-ed65-4fe2-afeb-1ddf5071c6af.js
T

59 lines
1.6 KiB
JavaScript
Raw Normal View History

2026-05-24 10:21:26 +08:00
"use strict";
cc._RF.push(module, '39dbbNg7WVP4q/rHd9Qccav', 'cmp.adventure.ui.log');
// Scripts/mod/pve/adventure/cmp/cmp.adventure.ui.log.js
"use strict";
var BridgeComp = require("bridge.component");
var ADVCT = require("adventure_controller");
var ADEVT = require("adventure_event");
var NxExpand = require("nx.fx.sv.expand");
//日志模塊
cc.Class({
"extends": BridgeComp,
properties: {
content: {
"default": null,
type: cc.Node
},
item: {
"default": null,
type: cc.Node
}
},
// LIFE-CYCLE CALLBACKS:
onLoad: function onLoad() {
this._super();
this.bindGEvent(ADEVT.Update_Fight_Log, this.refreshLogs.bind(this));
},
start: function start() {},
onEnable: function onEnable() {
this.type = ADVCT.getInstance().getPlayModel();
ADVCT.getInstance().send29543(this.type);
},
onDisable: function onDisable() {
this.unbindGEvents();
nx.bridge.NodeChidrenDestroy(this.content);
},
refreshLogs: function refreshLogs(data) {
nx.bridge.NodeChidrenDestroy(this.content);
var infos = data.log_info;
for (var i = 0; i < infos.length; i++) {
var bid = infos[i].item_id;
var cfg = null;
if (this.type == 1) {
cfg = game.configs.adventure_endless_data.data_evt_desc[bid];
} else {
cfg = game.configs.adventure_weekly_data.data_adventure_event[bid];
}
var c = cc.instantiate(this.item);
c.parent = this.content;
c.x = 0;
c.active = true;
nx.gui.setString(c, "scroll/txt", cfg.log);
}
} // update (dt) {},
});
cc._RF.pop();