|
|
@@ -8,6 +8,7 @@ import barracksUI from "../barracks/barracksUI";
|
|
|
import DrawRecruitUI from "../drawRecruit/DrawRecruitUI";
|
|
|
import GeneralUI from "../general/GeneralUI";
|
|
|
import MarshalStageUI from "../marshalStage/MarshalStageUI";
|
|
|
+import ResultModel from "./ResultModel";
|
|
|
const { ccclass, property } = cc._decorator;
|
|
|
|
|
|
@ccclass
|
|
|
@@ -49,6 +50,7 @@ export default class ResultUI extends BaseUI {
|
|
|
/** 当前时间s */
|
|
|
private cur_time = 0;
|
|
|
onLoad() {
|
|
|
+ ResultModel.icon_list = [];
|
|
|
XXEvent.addClickEvent(this.btn_goto_1, this.goToUI, this, 1);
|
|
|
XXEvent.addClickEvent(this.btn_goto_2, this.goToUI, this, 2);
|
|
|
XXEvent.addClickEvent(this.btn_goto_3, this.goToUI, this, 3);
|
|
|
@@ -73,6 +75,7 @@ export default class ResultUI extends BaseUI {
|
|
|
*/
|
|
|
private initIconStyle() {
|
|
|
this.ui_data.icon_data = StringUtil.analysisItemStr(this.ui_data.icon_data);
|
|
|
+ ResultModel.icon_list = this.ui_data.icon_data;
|
|
|
const n_count = this.arr_icon.length;
|
|
|
for (let i = 0; i < n_count; i++) {
|
|
|
let node_icon = this.arr_icon[i];
|
|
|
@@ -91,8 +94,6 @@ export default class ResultUI extends BaseUI {
|
|
|
XXLoader.loadAssetByType(icon_path, cc.SpriteFrame, (asset) => {
|
|
|
img_icon.spriteFrame = asset;
|
|
|
})
|
|
|
- // 加奖励
|
|
|
- StringUtil.saveBag(parseInt(icon_data.id), parseInt(icon_data.count), parseInt(icon_data.general_id));
|
|
|
}
|
|
|
}
|
|
|
/** 界面跳转
|
|
|
@@ -187,6 +188,11 @@ export default class ResultUI extends BaseUI {
|
|
|
start_pos: start_node_pos,
|
|
|
end_pos: end_node_pos,
|
|
|
complete_call: () => {
|
|
|
+ if (arr_item[i] === 1) {
|
|
|
+ this.scheduleOnce(() => {
|
|
|
+ ResultModel.getReward();
|
|
|
+ }, i * 1)
|
|
|
+ }
|
|
|
},
|
|
|
}
|
|
|
// 发起飞item事件
|