|
@@ -24,6 +24,8 @@ import PiggyBankModel from "../piggyBank/PiggyBankModel";
|
|
|
import CheckpointRedBagModle from "../checkpointRedBag/CheckpointRedBagModle";
|
|
import CheckpointRedBagModle from "../checkpointRedBag/CheckpointRedBagModle";
|
|
|
import GetLiangCaoUI from "../getLiangCao/GetLiangCaoUI";
|
|
import GetLiangCaoUI from "../getLiangCao/GetLiangCaoUI";
|
|
|
import GetLiangCaoModel from "../getLiangCao/GetLiangCaoModel";
|
|
import GetLiangCaoModel from "../getLiangCao/GetLiangCaoModel";
|
|
|
|
|
+import investUI from "../invest/investUI";
|
|
|
|
|
+import investModel from "../invest/investModel";
|
|
|
|
|
|
|
|
const { ccclass, property } = cc._decorator;
|
|
const { ccclass, property } = cc._decorator;
|
|
|
|
|
|
|
@@ -77,6 +79,10 @@ export default class MainUI extends BaseUI {
|
|
|
barracks_red: cc.Node = null;
|
|
barracks_red: cc.Node = null;
|
|
|
@property({ type: cc.Node, displayName: "任务红点" })
|
|
@property({ type: cc.Node, displayName: "任务红点" })
|
|
|
task_red: cc.Node = null;
|
|
task_red: cc.Node = null;
|
|
|
|
|
+ @property({ type: cc.Node, displayName: "转盘红点" })
|
|
|
|
|
+ turntable_red: cc.Node = null;
|
|
|
|
|
+ @property({ type: cc.Node, displayName: "投资红点" })
|
|
|
|
|
+ invest_red: cc.Node = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
@property({ type: cc.Node, displayName: "气泡_统帅" })
|
|
@property({ type: cc.Node, displayName: "气泡_统帅" })
|
|
@@ -133,6 +139,9 @@ export default class MainUI extends BaseUI {
|
|
|
GameController.gameData.player.addComponent(this, PLAYERPROP.TURNTABLE_LUCK_TIMES);
|
|
GameController.gameData.player.addComponent(this, PLAYERPROP.TURNTABLE_LUCK_TIMES);
|
|
|
GameController.gameData.player.addComponent(this, PLAYERPROP.USE_SKILLS_TIMES);
|
|
GameController.gameData.player.addComponent(this, PLAYERPROP.USE_SKILLS_TIMES);
|
|
|
GameController.gameData.player.addComponent(this, PLAYERPROP.LOOK_VIDEO_TIMES);
|
|
GameController.gameData.player.addComponent(this, PLAYERPROP.LOOK_VIDEO_TIMES);
|
|
|
|
|
+ //转盘每日次数
|
|
|
|
|
+ GameController.gameData.player.addComponent(this, PLAYERPROP.TURNTABLE_LEFTTIMES);
|
|
|
|
|
+ GameController.gameData.player.addComponent(this, PLAYERPROP.TURNTABLE_CARD);
|
|
|
|
|
|
|
|
this.mission = this.ui.missions.getComponent(MenuMission) as MenuMission;
|
|
this.mission = this.ui.missions.getComponent(MenuMission) as MenuMission;
|
|
|
|
|
|
|
@@ -140,6 +149,10 @@ export default class MainUI extends BaseUI {
|
|
|
|
|
|
|
|
this.barracks_red.active = barracksModel.getInstance().checkRed();
|
|
this.barracks_red.active = barracksModel.getInstance().checkRed();
|
|
|
turntableModel.Instance.updateResetTurntable();
|
|
turntableModel.Instance.updateResetTurntable();
|
|
|
|
|
+ this.turntable_red.active = turntableModel.Instance.checkRed();
|
|
|
|
|
+
|
|
|
|
|
+ investModel.Instance.getInvestInfo();
|
|
|
|
|
+
|
|
|
this.task_red.active = TaskModel.checkMainRed();
|
|
this.task_red.active = TaskModel.checkMainRed();
|
|
|
|
|
|
|
|
this.initScheduler();
|
|
this.initScheduler();
|
|
@@ -215,6 +228,11 @@ export default class MainUI extends BaseUI {
|
|
|
this.task_red.active = TaskModel.checkMainRed();
|
|
this.task_red.active = TaskModel.checkMainRed();
|
|
|
// cc.log('类型' + type + ':%o', value)
|
|
// cc.log('类型' + type + ':%o', value)
|
|
|
break;
|
|
break;
|
|
|
|
|
+
|
|
|
|
|
+ case PLAYERPROP.TURNTABLE_LEFTTIMES:
|
|
|
|
|
+ case PLAYERPROP.TURNTABLE_CARD:
|
|
|
|
|
+ this.turntable_red.active = turntableModel.Instance.checkRed();
|
|
|
|
|
+ break
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -321,8 +339,7 @@ export default class MainUI extends BaseUI {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
clickOpenGetGeneralUI() {
|
|
clickOpenGetGeneralUI() {
|
|
|
- //test
|
|
|
|
|
- this.clickTurntableUI();
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
clickTurntableUI() {
|
|
clickTurntableUI() {
|
|
@@ -330,6 +347,11 @@ export default class MainUI extends BaseUI {
|
|
|
GameController.uiM.openUI(turntableUI, null, ViewZorder.UI);
|
|
GameController.uiM.openUI(turntableUI, null, ViewZorder.UI);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ clickInvestUi() {
|
|
|
|
|
+ GameController.audioM.playEffect(AUDIO_TYPE.button);
|
|
|
|
|
+ GameController.uiM.openUI(investUI, null, ViewZorder.UI);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
clickOpenGeneralUI() {
|
|
clickOpenGeneralUI() {
|
|
|
GameController.audioM.playEffect(AUDIO_TYPE.button);
|
|
GameController.audioM.playEffect(AUDIO_TYPE.button);
|
|
|
GameController.uiM.openUI(GeneralUI, null, ViewZorder.UI, null, null, { tab_type: 0 });
|
|
GameController.uiM.openUI(GeneralUI, null, ViewZorder.UI, null, null, { tab_type: 0 });
|