require("Util") require("LuaUtil") require("LuaItemBase") LuaReliveLogic = {} function LuaReliveLogic.OnEnable( ... ) LuaReliveLogic.ReqForbiddenTopGetInfo() LuaReliveLogic.HideAllUI() end --请求紫禁之巅信息 function LuaReliveLogic.ReqForbiddenTopGetInfo() require("LuaDistributesReqForbiddenTopGetInfo") local reqInfo = {Flag = 1} LuaDistributesReqForbiddenTopGetInfo.SendPacket(reqInfo) end _DeadCount = 0 --死亡次数 function LuaReliveLogic.UpdateOnPacket(data) _DeadCount = data.DeadCount end function LuaReliveLogic.HideAllUI() local UI_Root = CS.UnityEngine.GameObject.Find("UiRoot(Clone)").gameObject local _UICamera = UI_Root.transform:Find("Camera").gameObject _UICamera:GetComponent("Camera").cullingMask = 32 local _BaseRight = UI_Root.transform:Find("BaseUIRoot"); if _BaseRight.transform:Find("BaseRight/ActiveBtns(Clone)") ~= nil then local _ActiveBtns = _BaseRight.transform:Find("BaseRight/ActiveBtns(Clone)").gameObject; _ActiveBtns:SetActive(true); end if _BaseRight.transform:Find("BaseRight/SkillBarRoot(Clone)") ~= nil then local _SkillBarRoot = _BaseRight.transform:Find("BaseRight/SkillBarRoot(Clone)").gameObject; _SkillBarRoot:SetActive(true); end if _BaseRight.transform:Find("BaseLeft/ChatFrameRoot(Clone)") ~= nil then local _ChatFrameRoot = _BaseRight.transform:Find("BaseLeft/ChatFrameRoot(Clone)/ChatFrameAnchor").gameObject; _ChatFrameRoot:SetActive(true); end if _BaseRight.transform:Find("BaseLeft/MissionDialogAndLeftTabsRoot(Clone)") ~= nil then local _MissionDialogAndLeftTabsRoot = _BaseRight.transform:Find("BaseLeft/MissionDialogAndLeftTabsRoot(Clone)").gameObject; _MissionDialogAndLeftTabsRoot:GetComponent("MissionDialogAndLeftTabsLogic"):OnBtnShow() end if _BaseRight.transform:Find("ExtraFunTipRoot(Clone)") ~= nil then local _ExtraFunTipRoot = _BaseRight.transform:Find("ExtraFunTipRoot(Clone)").gameObject; _ExtraFunTipRoot:SetActive(true); end local WorldUIRoot = "WorldUIRoot" local WorldUIRootObj = CS.UnityEngine.GameObject.Find(WorldUIRoot) if WorldUIRootObj.transform:Find("JoyStickRoot(Clone)") ~= nil then local _JoyStickRoot = WorldUIRootObj.transform:Find("JoyStickRoot(Clone)").gameObject; _JoyStickRoot:SetActive(true); end LuaUIMan:CloseUI("CameraControlPanel") end