Files
fc/dev/project/library/imports/d5/d5deb258-8d63-46ea-90bc-6da7494e9fc0.js
T

76 lines
2.0 KiB
JavaScript
Raw Normal View History

2026-05-24 10:21:26 +08:00
"use strict";
cc._RF.push(module, 'd5debJYjWNG6pC8badJTp/A', 'cmp.battledrama.hookreward');
// Scripts/mod/battle_drama/cmp/cmp.battledrama.hookreward.js
"use strict";
var BridgeWindow = require("bridge.window");
var FxSVC = require("nx.fx.sv.expand");
var PathTool = require("pathtool");
var TimeTool = require("timetool");
var BattleDramaController = require("battle_drama_controller");
var RoleController = require("role_controller");
var DramaEvent = require("battle_drama_event");
cc.Class({
"extends": BridgeWindow,
properties: {
SVClist: {
"default": null,
type: FxSVC
},
Bonlist: {
"default": null,
type: FxSVC
},
time_title: {
"default": null,
type: cc.Label
},
time_value: {
"default": null,
type: cc.Label
}
},
// LIFE-CYCLE CALLBACKS:
onLoad: function onLoad() {
this.controller = BattleDramaController.getInstance();
this.drama_model = this.controller.getModel();
this.role_vo = RoleController.getInstance().getRoleVo();
//快速战斗数据更新
this.bindGEvent(DramaEvent.UpHookRewardWin, this.upHookData.bind(this));
},
start: function start() {},
touchGetItems: function touchGetItems() {
var _this = this;
this.controller.requestGetHookTimeAwards(function (_data) {
if (_data) {
_this.controller.openDramHookRewardView(false);
}
});
},
onOpenConfigs: function onOpenConfigs() {
this.time_title.string = nx.text.getKey("action_str27");
this.controller.send13017();
},
onPreClosed: function onPreClosed() {
this.SVClist.rebuild([]);
this.Bonlist.rebuild([]);
},
setBaseInfo: function setBaseInfo(data) {
if (!data) return;
this.time_value.string = TimeTool.getTimeFormat(data.hook_time);
},
upHookData: function upHookData(data) {
this.setBaseInfo(data);
this.SVClist.rebuild(data.list);
this.Bonlist.rebuild(data.list1);
},
onDisable: function onDisable() {
if (nx.bridge.prompt) {
nx.bridge.prompt.delPrompt(31);
}
} // update (dt) {},
});
cc._RF.pop();