|
|
@@ -16,11 +16,13 @@ import AttackFlash from "./model/attack/AttackFlash";
|
|
|
import AttackWJQF from "./model/attack/AttackWJQF";
|
|
|
import { POPTYPE } from "../../component/PopMessage";
|
|
|
import MissionUpdateResponse from "../../net/msg/MissionUpdateResponse";
|
|
|
-import { PLAYERPROP } from "../../data/GameDefinition";
|
|
|
+import { AUDIO_TYPE, PLAYERPROP } from "../../data/GameDefinition";
|
|
|
import GeneralExpUpResponse from "../../net/msg/GeneralExpUpResponse";
|
|
|
import AttackWall from "./model/attack/AttackWall";
|
|
|
import TaskModel from "../task/TaskModel";
|
|
|
import PiggyBankModel from "../piggyBank/PiggyBankModel";
|
|
|
+import GeneralUI from "../general/GeneralUI";
|
|
|
+import { ViewZorder } from "../../../MOKA/data/ViewZOrder";
|
|
|
|
|
|
const { ccclass, property } = cc._decorator;
|
|
|
|
|
|
@@ -100,6 +102,8 @@ export default class FightUI extends BaseUI {
|
|
|
for (let i = 1; i <= 5; i++) {
|
|
|
let node_bg: cc.Node = this.ui['general_bg' + i];
|
|
|
this.generalCroods.push(new cc.Vec2(node_bg.x, node_bg.y));
|
|
|
+ let bnt_add_general = this.ui['add_general_' + i].getComponent(cc.Button);
|
|
|
+ XXEvent.addClickEvent(bnt_add_general, this.onClickGotoZhenWei, this);
|
|
|
}
|
|
|
|
|
|
this.fightData = GameController.gameData.fightData;
|
|
|
@@ -166,13 +170,17 @@ export default class FightUI extends BaseUI {
|
|
|
*/
|
|
|
private updateStage(i) {
|
|
|
let open = GameController.gameData.player.mission_open[i];
|
|
|
- let lbl: cc.Node = this.ui['lbl_general' + (i + 1)];
|
|
|
+ let index = i + 1;
|
|
|
+ let lbl: cc.Node = this.ui['lbl_general' + index];
|
|
|
lbl.getComponent(cc.RichText).string = `<outline color=black width=2><color=#F1440B><b>${open}关</c><color=#ffffff><b>解锁</color></outline>`;
|
|
|
|
|
|
let vo = GameController.gameData.player.generals[i];
|
|
|
lbl.active = !vo && this.current_mission < open;
|
|
|
this.updateGeneral(i, vo);
|
|
|
- this.ui['img_suo' + (i + 1)].active = lbl.active;
|
|
|
+ this.ui['img_suo' + index].active = lbl.active;
|
|
|
+ // +号按钮显示逻辑
|
|
|
+ let add_general = this.ui['add_general_' + index];
|
|
|
+ add_general.active = !lbl.active && !vo;
|
|
|
}
|
|
|
/**
|
|
|
*
|
|
|
@@ -1171,6 +1179,11 @@ export default class FightUI extends BaseUI {
|
|
|
this.btn_skill.active = GameController.gameData.player.isExistMarshalGeneral();
|
|
|
XXEvent.emit("MainUIUpdateQiPaoMarshal");
|
|
|
}
|
|
|
+ /** 点击阵位+号,跳转武将-阵位界面 */
|
|
|
+ private onClickGotoZhenWei() {
|
|
|
+ GameController.audioM.playEffect(AUDIO_TYPE.button);
|
|
|
+ GameController.uiM.openUI(GeneralUI, null, ViewZorder.UI, null, null, { tab_type: 1 });
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/** 技能伤害 */
|