灵兽功能入口屏蔽

onepiece_demo_arena
wangzhenxing 2023-12-04 17:36:53 +08:00
parent f1746010d1
commit 9b600f9f85
1 changed files with 31 additions and 29 deletions

View File

@ -320,7 +320,7 @@ function this:InitComponent()
this.RightUp2gridSize = this.RightUp2Grid:GetComponent("RectTransform") this.RightUp2gridSize = this.RightUp2Grid:GetComponent("RectTransform")
this.jiantouObj=Util.GetGameObject(self.gameObject, "jiantouObj") this.jiantouObj=Util.GetGameObject(self.gameObject, "jiantouObj")
this.jiantouObj:SetActive(false)
this.taiChuMiJuanBtn = Util.GetGameObject(self.gameObject, "taichumijuan") this.taiChuMiJuanBtn = Util.GetGameObject(self.gameObject, "taichumijuan")
this.taichumijuanRed=Util.GetGameObject(this.taiChuMiJuanBtn, "redPoint") this.taichumijuanRed=Util.GetGameObject(this.taiChuMiJuanBtn, "redPoint")
@ -1372,6 +1372,7 @@ function this:OnShow()
this.battleUpLvTip:SetActive(false) this.battleUpLvTip:SetActive(false)
this.btnShenzun:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.NewShenzun)) this.btnShenzun:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.NewShenzun))
this.btnHomeLand:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.TrainBuild)) this.btnHomeLand:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.TrainBuild))
this.btnPokemon:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.POKEMON))
this.btn_weapon:SetActive(false) this.btn_weapon:SetActive(false)
--检测灵兽红点 --检测灵兽红点
@ -1427,35 +1428,36 @@ local pos1=nil
local pos2=nil local pos2=nil
function this.CheckScreenRightRedPoint() function this.CheckScreenRightRedPoint()
if UIManager.camera ==nil then -- if UIManager.camera ==nil then
return -- return
end -- end
if not this.btnPokemon then -- if not this.btnPokemon then
return -- return
end -- end
if not this.btnHomeLand then -- if not this.btnHomeLand then
return -- return
end -- end
if not this.btnPokemon.gameObject then -- if not this.btnPokemon.gameObject then
return -- return
end -- end
if not this.btnHomeLand.gameObject then -- if not this.btnHomeLand.gameObject then
return -- return
end -- end
if not this.btnPokemon.gameObject.transform then -- if not this.btnPokemon.gameObject.transform then
return -- return
end -- end
if not this.btnHomeLand.gameObject.transform then -- if not this.btnHomeLand.gameObject.transform then
return -- return
end -- end
pos1=RectTransformUtility.WorldToScreenPoint(UIManager.camera,this.btnPokemon.transform.position) -- pos1=RectTransformUtility.WorldToScreenPoint(UIManager.camera,this.btnPokemon.transform.position)
pos2=RectTransformUtility.WorldToScreenPoint(UIManager.camera,this.btnHomeLand.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 -- 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) -- this.jiantouObj:SetActive(true)
else -- else
this.jiantouObj:SetActive(false) -- this.jiantouObj:SetActive(false)
end -- end
this.jiantouObj:SetActive(false)
end end