Files
fc/dev/project/assets/Scripts/mod/home/achievement/cmp.achievement.rewards.wnd.js
T

48 lines
1.1 KiB
JavaScript
Raw Normal View History

2026-05-23 22:10:14 +08:00
/******************************************************************
*
* 成就阶段奖励界面
*
******************************************************************/
const BridgeWindow = require( "bridge.window" );
const FxSVC = require( "nx.fx.sv.expand" );
const TaskController = require( "task.mod" );
cc.Class( {
extends: BridgeWindow,
properties: {
svcList: { default: null, type: FxSVC },
},
// 显示
onEnable: function() {
let TC = TaskController.getInstance();
let score = TC.getModel().achievement_score_tar;
this.data = [];
let DATA = game.configs.feat_data.data_get_reward;
for( let i in DATA ) {
let 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() {
},
} );