灵兽功能入口屏蔽

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.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