|
|
@@ -48,15 +48,20 @@ export default class MainUI extends BaseUI {
|
|
|
@property(cc.Sprite)
|
|
|
img_head: cc.Sprite = null;
|
|
|
@property(cc.Layout)
|
|
|
- node_buff:cc.Layout = null;
|
|
|
+ node_buff: cc.Layout = null;
|
|
|
@property(cc.Label)
|
|
|
lbl_redbag: cc.Label = null;
|
|
|
@property(ProgressBarCircle)
|
|
|
- bar_food:ProgressBarCircle = null;
|
|
|
+ bar_food: ProgressBarCircle = null;
|
|
|
@property(cc.Label)
|
|
|
lbl_train_times: cc.Label = null;
|
|
|
+ @property({ type: cc.Label, displayName: 'lbl粮草进度' })
|
|
|
+ lbl_food_bar: cc.Label = null;
|
|
|
+ @property({ type: cc.Sprite, displayName: 'spr粮草进度' })
|
|
|
+ spr_food_bar: cc.Sprite = null;
|
|
|
+
|
|
|
@property(cc.Label)
|
|
|
- lbl_mission:cc.Label = null;
|
|
|
+ lbl_mission: cc.Label = null;
|
|
|
@property(cc.RichText)
|
|
|
lbl_foodAll: cc.RichText = null;
|
|
|
@property(cc.Label)
|
|
|
@@ -66,7 +71,7 @@ export default class MainUI extends BaseUI {
|
|
|
@property(cc.Button)
|
|
|
btn_gm: cc.Button = null;
|
|
|
@property(cc.Button)
|
|
|
- btn_challenge:cc.Button = null;
|
|
|
+ btn_challenge: cc.Button = null;
|
|
|
@property(cc.Button)
|
|
|
btn_marshalstage: cc.Button = null;
|
|
|
@property(cc.Button)
|
|
|
@@ -206,20 +211,20 @@ export default class MainUI extends BaseUI {
|
|
|
}, 1);
|
|
|
}
|
|
|
|
|
|
- addBuff(){
|
|
|
+ addBuff() {
|
|
|
|
|
|
}
|
|
|
- addBuffIcon(){
|
|
|
+ addBuffIcon() {
|
|
|
|
|
|
}
|
|
|
- removeBuff(){
|
|
|
+ removeBuff() {
|
|
|
|
|
|
}
|
|
|
hasBuffIcon(bufftype: BUFFTYPE) {
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
removeBuffIcon(bufftype: BUFFTYPE) {
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
updateOpenUI() {
|
|
|
@@ -243,6 +248,12 @@ export default class MainUI extends BaseUI {
|
|
|
break;
|
|
|
case PLAYERPROP.FOOD:
|
|
|
this.lbl_foodAll.string = value + "";
|
|
|
+ // 粮草进度 = 单次粮草消耗/剩余粮草总数
|
|
|
+ let food_count = GameController.gameData.player.getProp(PLAYERPROP.FOOD);
|
|
|
+ let consume_food = GameController.gameData.player.getProp(PLAYERPROP.FOODCONSUME);
|
|
|
+ this.lbl_food_bar.string = consume_food + '/' + food_count;
|
|
|
+ let bar_value = consume_food / food_count;
|
|
|
+ this.spr_food_bar.fillRange = bar_value;
|
|
|
this.task_red.active = TaskModel.checkMainRed();
|
|
|
this.showBtnExpUpOrLcBtn();
|
|
|
break;
|