public void CheckActPlayModeTipsForLobby() { uint result = 0; uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_Fire"), out result); stMatchOpenInfo matchOpenState = CUICommonSystem.GetMatchOpenState(RES_BATTLE_MAP_TYPE.RES_BATTLE_MAP_TYPE_ENTERTAINMENT, result); CUIFormScript form = Singleton <CUIManager> .instance.GetForm(LobbyForm.FORM_PATH); if (form != null) { if (!CSysDynamicBlock.bLobbyEntryBlocked) { Transform transform = form.transform.Find("BtnCon/PvpBtn/ActModePanel"); if (transform != null) { transform.SetAsLastSibling(); transform.gameObject.CustomSetActive(matchOpenState.matchState == enMatchOpenState.enMatchOpen_InActiveTime); } } Transform transform2 = form.transform.FindChild("BtnCon/UnionBtn/ShangJin"); if (transform2 != null) { transform2.SetAsLastSibling(); transform2.gameObject.CustomSetActive(CUnionBattleEntrySystem.HasMatchInActiveTime()); } } }
public void CheckActPlayModeTipsForPvpEntry() { uint result = 0; uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_Fire"), out result); stMatchOpenInfo matchOpenState = CUICommonSystem.GetMatchOpenState(RES_BATTLE_MAP_TYPE.RES_BATTLE_MAP_TYPE_ENTERTAINMENT, result); CUIFormScript form = Singleton <CUIManager> .instance.GetForm(CMatchingSystem.PATH_MATCHING_ENTRY); if ((form != null) && !CSysDynamicBlock.bLobbyEntryBlocked) { Transform transform = form.transform.Find("panelGroup1/btnGroup/Button1/ActModePanel"); if (transform != null) { transform.gameObject.CustomSetActive(matchOpenState.matchState == enMatchOpenState.enMatchOpen_InActiveTime); } } if (form != null) { Transform transform2 = form.transform.Find("panelGroup2/btnGroup/Button5"); Transform transform3 = form.transform.Find("panelGroup2/btnGroup/Button5/Lock"); Transform transform4 = form.transform.Find("panelGroup2/btnGroup/Button5/Open"); if (transform2 != null) { CUIMiniEventScript component = transform2.GetComponent <CUIMiniEventScript>(); if (((transform3 != null) && (transform4 != null)) && (component != null)) { transform2.gameObject.CustomSetActive(false); transform3.gameObject.CustomSetActive(false); transform4.gameObject.CustomSetActive(false); component.enabled = false; if (matchOpenState.matchState == enMatchOpenState.enMatchOpen_InActiveTime) { CUICommonSystem.SetTextContent(transform4.Find("Text").gameObject, matchOpenState.descStr); transform4.gameObject.CustomSetActive(true); transform2.gameObject.CustomSetActive(true); component.enabled = true; if (CSysDynamicBlock.bLobbyEntryBlocked) { Transform transform5 = transform4.FindChild("Image"); Transform transform6 = transform4.FindChild("TextOpen"); if ((transform5 != null) && (transform6 != null)) { transform5.gameObject.CustomSetActive(false); transform6.gameObject.CustomSetActive(false); } } } else if (matchOpenState.matchState == enMatchOpenState.enMatchOpen_NotInActiveTime) { CUICommonSystem.SetTextContent(transform3.Find("Text").gameObject, matchOpenState.descStr); transform3.gameObject.CustomSetActive(true); transform2.gameObject.CustomSetActive(true); } } } } }
public void refreshEntertainMentOpenStateUI(GameObject btn, uint mapId) { if (btn == null) { return; } Transform transform = btn.transform; if (transform) { Transform transform2 = transform.FindChild("Lock"); Transform transform3 = transform.FindChild("Open"); Transform transform4 = transform.FindChild("NotOpen"); stMatchOpenInfo matchOpenState = CUICommonSystem.GetMatchOpenState(4, mapId); CUIMiniEventScript component = transform.GetComponent <CUIMiniEventScript>(); if (transform2 && transform3 && component) { transform.gameObject.CustomSetActive(false); transform2.gameObject.CustomSetActive(false); transform3.gameObject.CustomSetActive(false); if (transform4) { transform4.gameObject.CustomSetActive(false); } component.m_onClickEventParams.commonBool = false; if (matchOpenState.matchState == enMatchOpenState.enMatchOpen_InActiveTime) { CUICommonSystem.SetTextContent(transform3.Find("Text").gameObject, matchOpenState.descStr); transform3.gameObject.CustomSetActive(true); transform.gameObject.CustomSetActive(true); component.m_onClickEventParams.commonBool = true; if (CSysDynamicBlock.bLobbyEntryBlocked) { Transform transform5 = transform3.FindChild("Image"); Transform transform6 = transform3.FindChild("TextOpen"); if (transform5 && transform6) { transform5.gameObject.CustomSetActive(false); transform6.gameObject.CustomSetActive(false); } } } else if (matchOpenState.matchState == enMatchOpenState.enMatchOpen_NotInActiveTime) { CUICommonSystem.SetTextContent(transform2.Find("Text").gameObject, matchOpenState.descStr); transform2.gameObject.CustomSetActive(true); transform.gameObject.CustomSetActive(true); } else if (transform4) { transform.gameObject.CustomSetActive(true); transform4.gameObject.CustomSetActive(true); } } } }
public void refreshEntertainMentOpenStateUI(GameObject btn, uint mapId) { if (btn != null) { Transform transform = btn.transform; Transform transform2 = transform.FindChild("Lock"); Transform transform3 = transform.FindChild("Open"); Transform transform4 = transform.FindChild("NotOpen"); stMatchOpenInfo matchOpenState = CUICommonSystem.GetMatchOpenState(RES_BATTLE_MAP_TYPE.RES_BATTLE_MAP_TYPE_ENTERTAINMENT, mapId); if (transform != null) { CUIMiniEventScript component = transform.GetComponent <CUIMiniEventScript>(); if (((transform2 != null) && (transform3 != null)) && (component != null)) { transform.gameObject.CustomSetActive(false); transform2.gameObject.CustomSetActive(false); transform3.gameObject.CustomSetActive(false); if (transform4 != null) { transform4.gameObject.CustomSetActive(false); } component.m_onClickEventParams.commonBool = false; if (matchOpenState.matchState == enMatchOpenState.enMatchOpen_InActiveTime) { CUICommonSystem.SetTextContent(transform3.Find("Text").gameObject, matchOpenState.descStr); transform3.gameObject.CustomSetActive(true); transform.gameObject.CustomSetActive(true); component.m_onClickEventParams.commonBool = true; if (CSysDynamicBlock.bLobbyEntryBlocked) { Transform transform5 = transform3.FindChild("Image"); Transform transform6 = transform3.FindChild("TextOpen"); if ((transform5 != null) && (transform6 != null)) { transform5.gameObject.CustomSetActive(false); transform6.gameObject.CustomSetActive(false); } } } else if (matchOpenState.matchState == enMatchOpenState.enMatchOpen_NotInActiveTime) { CUICommonSystem.SetTextContent(transform2.Find("Text").gameObject, matchOpenState.descStr); transform2.gameObject.CustomSetActive(true); transform.gameObject.CustomSetActive(true); } else if (transform4 != null) { transform.gameObject.CustomSetActive(true); transform4.gameObject.CustomSetActive(true); } } } } }