34 lines
1.0 KiB
Plaintext
34 lines
1.0 KiB
Plaintext
--添加双人坐骑的界面提示
|
|
|
|
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
|