diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index 974ac5f4fa..ed1d30d24b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -320,7 +320,7 @@ function this:InitComponent() this.RightUp2gridSize = this.RightUp2Grid:GetComponent("RectTransform") this.jiantouObj=Util.GetGameObject(self.gameObject, "jiantouObj") - + this.jiantouObj:SetActive(false) this.taiChuMiJuanBtn = Util.GetGameObject(self.gameObject, "taichumijuan") this.taichumijuanRed=Util.GetGameObject(this.taiChuMiJuanBtn, "redPoint") @@ -1372,6 +1372,7 @@ function this:OnShow() this.battleUpLvTip:SetActive(false) this.btnShenzun:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.NewShenzun)) this.btnHomeLand:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.TrainBuild)) + this.btnPokemon:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.POKEMON)) this.btn_weapon:SetActive(false) --检测灵兽红点 @@ -1427,35 +1428,36 @@ local pos1=nil local pos2=nil function this.CheckScreenRightRedPoint() - if UIManager.camera ==nil then - return - end - if not this.btnPokemon then - return - end - if not this.btnHomeLand then - return - end - if not this.btnPokemon.gameObject then - return - end - if not this.btnHomeLand.gameObject then - return - end - if not this.btnPokemon.gameObject.transform then - return - end + -- if UIManager.camera ==nil then + -- return + -- end + -- if not this.btnPokemon then + -- return + -- end + -- if not this.btnHomeLand then + -- return + -- end + -- if not this.btnPokemon.gameObject then + -- return + -- end + -- if not this.btnHomeLand.gameObject then + -- return + -- end + -- if not this.btnPokemon.gameObject.transform then + -- return + -- end - if not this.btnHomeLand.gameObject.transform then - return - end - pos1=RectTransformUtility.WorldToScreenPoint(UIManager.camera,this.btnPokemon.transform.position) - pos2=RectTransformUtility.WorldToScreenPoint(UIManager.camera,this.btnHomeLand.transform.position) - if (pos1.x>Screen.width and RedpotManager.GetRedPointStatus(RedPointType.PokemonMainCity)==RedPointStatus.Show) then--or (pos2.x>Screen.width and RedpotManager.GetRedPointStatus(RedPointType.Vientiane)==RedPointStatus.Show) then - this.jiantouObj:SetActive(true) - else - this.jiantouObj:SetActive(false) - end + -- if not this.btnHomeLand.gameObject.transform then + -- return + -- end + -- pos1=RectTransformUtility.WorldToScreenPoint(UIManager.camera,this.btnPokemon.transform.position) + -- pos2=RectTransformUtility.WorldToScreenPoint(UIManager.camera,this.btnHomeLand.transform.position) + -- if (pos1.x>Screen.width and RedpotManager.GetRedPointStatus(RedPointType.PokemonMainCity)==RedPointStatus.Show) then--or (pos2.x>Screen.width and RedpotManager.GetRedPointStatus(RedPointType.Vientiane)==RedPointStatus.Show) then + -- this.jiantouObj:SetActive(true) + -- else + -- this.jiantouObj:SetActive(false) + -- end + this.jiantouObj:SetActive(false) end