Files
JJBB/Assets/Project/Script/LuaScripts/UI/Lua/DoubleMount/DoubleMountInvitePanelPatch.txt

34 lines
1.0 KiB
Plaintext
Raw Normal View History

2024-08-23 15:49:34 +08:00
--添加双人坐骑的界面提示
require 'LuaUtil'
require 'Util'
DoubleMountInvitePanelPatch = {}
function DoubleMountInvitePanelPatch.ShowUIText()
local _SomeoneParentChildCount = _SomeoneParent.transform.childCount
if _SomeoneParentChildCount > 0 then
for i=1,_SomeoneParentChildCount do
if _SomeoneParent.transform:GetChild(i-1).gameObject.activeInHierarchy then
if _UninhabitedText.gameObject.activeInHierarchy == true then
_UninhabitedText.gameObject:SetActive(false)
end
else
if _UninhabitedText.gameObject.activeInHierarchy == false then
_UninhabitedText.gameObject:SetActive(true)
end
end
end
else
if _UninhabitedText.gameObject.activeInHierarchy == false then
_UninhabitedText.gameObject:SetActive(true)
end
end
end
function DoubleMountInvitePanelPatch.Update()
DoubleMountInvitePanelPatch.ShowUIText()
end