46 lines
1.2 KiB
JavaScript
46 lines
1.2 KiB
JavaScript
|
|
"use strict";
|
||
|
|
cc._RF.push(module, '7d187OGxYZJNrCUSrWXuS3y', 'cmp.achievement.rewards.wnd');
|
||
|
|
// Scripts/mod/home/achievement/cmp.achievement.rewards.wnd.js
|
||
|
|
|
||
|
|
"use strict";
|
||
|
|
|
||
|
|
/******************************************************************
|
||
|
|
*
|
||
|
|
* 成就阶段奖励界面
|
||
|
|
*
|
||
|
|
******************************************************************/
|
||
|
|
|
||
|
|
var BridgeWindow = require("bridge.window");
|
||
|
|
var FxSVC = require("nx.fx.sv.expand");
|
||
|
|
var TaskController = require("task.mod");
|
||
|
|
cc.Class({
|
||
|
|
"extends": BridgeWindow,
|
||
|
|
properties: {
|
||
|
|
svcList: {
|
||
|
|
"default": null,
|
||
|
|
type: FxSVC
|
||
|
|
}
|
||
|
|
},
|
||
|
|
// 显示
|
||
|
|
onEnable: function onEnable() {
|
||
|
|
var TC = TaskController.getInstance();
|
||
|
|
var score = TC.getModel().achievement_score_tar;
|
||
|
|
this.data = [];
|
||
|
|
var DATA = game.configs.feat_data.data_get_reward;
|
||
|
|
for (var i in DATA) {
|
||
|
|
var item = DATA[i];
|
||
|
|
this.data.push({
|
||
|
|
id: item.id,
|
||
|
|
rewards: item.rewards,
|
||
|
|
val: item.val,
|
||
|
|
done: item.val < score
|
||
|
|
});
|
||
|
|
}
|
||
|
|
nx.gui.setActive(this.svcList, "empty", nx.dt.arrEmpty(this.data));
|
||
|
|
this.svcList.rebuild(this.data);
|
||
|
|
},
|
||
|
|
// 关闭
|
||
|
|
onDisable: function onDisable() {}
|
||
|
|
});
|
||
|
|
|
||
|
|
cc._RF.pop();
|