From 43f7ca10bc41006b61776135823a7abb74cb441c Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Mon, 20 Jul 2020 11:02:40 +0800 Subject: [PATCH] --- .../~Lua/Modules/Battle/View/BattlePanel.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua index 154ee994ac..7322b578ca 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua @@ -33,7 +33,6 @@ function this:InitComponent() this.BtnTimeScale = Util.GetGameObject(this.DownRoot, "option/BtnTimeScale") this.BtnExit = Util.GetGameObject(this.DownRoot, "option/BtnExit") - this.Button = Util.GetGameObject(this.DownRoot, "option/Button") this.ButtonLock = Util.GetGameObject(this.DownRoot, "option/Button/lock") this.BtnGM = Util.GetGameObject(this.DownRoot, "option/Button") @@ -201,7 +200,7 @@ function this:OnOpen(_fightData, _fightType, _endFunc) -- LogPink(fightType) this.BG:GetComponent("Image").sprite = Util.LoadSprite(BattleManager.GetBattleBg(fightType)) - this.BtnGM:SetActive(AppConst.isOpenGM) + -- this.BtnGM:SetActive(AppConst.isOpenGM) this.BtnExit:SetActive(false)--FightPointPassManager.GetStopBtnState()) @@ -281,8 +280,14 @@ function this.InitOption() Util.GetGameObject(this.BtnTimeScale, "lock"):SetActive(not BattleManager.IsUnlockBattleSpeed()) local IsUnLockBattlePass = BattleManager.IsUnlockBattlePass() --or AppConst.isOpenGM Util.GetGameObject(this.BtnExit, "lock"):SetActive(not IsUnLockBattlePass) - Util.GetGameObject(this.BtnGM, "lock"):SetActive(not IsUnLockBattlePass) - this.BtnGM:GetComponent("Button").interactable = IsUnLockBattlePass + if AppConst.isOpenGM then + Util.GetGameObject(this.BtnGM, "lock"):SetActive(false) + else + Util.GetGameObject(this.BtnGM, "lock"):SetActive(not IsUnLockBattlePass) + this.BtnGM:GetComponent("Button").interactable = IsUnLockBattlePass + end + + -- 初始化战斗时间,刷新前端显示 BattleManager.InitTimeScale()