public void Clear() { Singleton <CSoundManager> .GetInstance().UnLoadBank("System_Call", CSoundManager.BankType.Battle); this.UnRegInBattleEvent(); Singleton <InBattleMsgMgr> .instance.inbatEntList.Clear(); DictionaryView <ulong, BubbleTimerEntity> .Enumerator enumerator = this.player_bubbleTime_map.GetEnumerator(); while (enumerator.MoveNext()) { KeyValuePair <ulong, BubbleTimerEntity> current = enumerator.Current; BubbleTimerEntity entity = current.Value; if (entity != null) { entity.Clear(); } } this.player_bubbleTime_map.Clear(); this.contentList = null; if (this.m_cdButton != null) { this.m_cdButton.Clear(); this.m_cdButton = null; } this.m_CUIForm = null; this.m_battleForm = null; Singleton <CUIManager> .GetInstance().CloseForm(InBattleMsgView_FORM_PATH); }
public void Clear() { Singleton <CSoundManager> .GetInstance().UnLoadBank("System_Call", CSoundManager.BankType.Battle); this.UnRegInBattleEvent(); Singleton <InBattleMsgMgr> .instance.inbatEntList.Clear(); DictionaryView <ulong, BubbleTimerEntity> .Enumerator enumerator = this.player_bubbleTime_map.GetEnumerator(); while (enumerator.MoveNext()) { KeyValuePair <ulong, BubbleTimerEntity> current = enumerator.Current; BubbleTimerEntity value = current.get_Value(); if (value != null) { value.Clear(); } } this.player_bubbleTime_map.Clear(); this.indexTabTypeMap = null; this.tabList = null; this.reserveList = null; this.shortcutList = null; this.noReceiveNode = null; this.NoMoreReceiveReverse = false; this.signalPanelChatBtn = null; if (this.m_cdButton != null) { this.m_cdButton.Clear(); this.m_cdButton = null; } this.m_CUIForm = null; Singleton <CUIManager> .GetInstance().CloseForm(InBattleShortcut.InBattleMsgView_FORM_PATH); }
public void OpenForm(CUIFormScript battleForm, CUIEvent uiEvent, bool bShow = true) { if (this.m_CUIForm != null) { this.m_CUIForm.gameObject.CustomSetActive(true); if (this.contentList != null) { this.contentList.SelectElement(-1, false); } GameObject gameObject = Utility.FindChild(this.m_CUIForm.gameObject, "chatTools/node/InputChat_Buttons"); if (gameObject != null) { gameObject.CustomSetActive(GameSettings.InBattleInputChatEnable == 1); } return; } this.m_battleForm = battleForm; this.m_CUIForm = Singleton <CUIManager> .GetInstance().OpenForm(InBattleShortcut.InBattleMsgView_FORM_PATH, true, true); DebugHelper.Assert(this.m_CUIForm != null, "InbattleMsgView m_CUIForm == null"); if (this.m_CUIForm == null) { return; } Singleton <CSoundManager> .GetInstance().LoadBank("System_Call", CSoundManager.BankType.Battle); this.RegInBattleEvent(); Singleton <InBattleMsgMgr> .get_instance().BuildInBatEnt(); this.contentList = this.m_CUIForm.transform.Find("chatTools/node/ListView/List").GetComponent <CUIListScript>(); DebugHelper.Assert(this.contentList != null, "InbattleMsgView contentList == null"); if (this.contentList == null) { return; } GameObject gameObject2 = battleForm.transform.Find("panelTopRight/SignalPanel/Button_Chat").gameObject; DebugHelper.Assert(gameObject2 != null, "InbattleMsgView btnObj == null"); if (gameObject2 != null) { gameObject2.CustomSetActive(true); } this.m_cdButton = new CDButton(gameObject2); GameObject gameObject3 = Utility.FindChild(this.m_CUIForm.gameObject, "chatTools/node/InputChat_Buttons"); if (gameObject3 != null) { gameObject3.CustomSetActive(GameSettings.InBattleInputChatEnable == 1); } if (!bShow) { this.m_CUIForm.gameObject.CustomSetActive(false); } this.Refresh_List(); }
public void CacheForm(CUIFormScript battleForm, bool bPVP, bool bPVE) { this.NoMoreReceiveReverse = false; this.m_CUIForm = Singleton <CUIManager> .GetInstance().OpenForm(InBattleShortcut.InBattleMsgView_FORM_PATH, true, true); DebugHelper.Assert(this.m_CUIForm != null, "InbattleMsgView m_CUIForm == null"); if (this.m_CUIForm == null) { return; } this.m_CUIForm.gameObject.CustomSetActive(false); Singleton <CSoundManager> .GetInstance().LoadBank("System_Call", CSoundManager.BankType.Battle); this.RegInBattleEvent(); if (bPVP) { Singleton <InBattleMsgMgr> .instance.BuildInBatEnt(); } this.reserveList = Utility.GetComponetInChild <CUIListScript>(this.m_CUIForm.gameObject, "chatTools/node/ListView/ReserveList"); this.shortcutList = Utility.GetComponetInChild <CUIListScript>(this.m_CUIForm.gameObject, "chatTools/node/ListView/ShortCutList"); this.noReceiveNode = Utility.FindChild(this.m_CUIForm.gameObject, "chatTools/node/NoReceiveNode"); this.tabList = Utility.GetComponetInChild <CUIListScript>(this.m_CUIForm.gameObject, "chatTools/node/Tab/List"); this.signalPanelChatBtn = Utility.FindChild(battleForm.gameObject, "PVPTopRightPanel/panelTopRight/SignalPanel/Button_Chat"); DebugHelper.Assert(this.signalPanelChatBtn != null, "InbattleMsgView signalPanelChatBtn == null"); if (this.signalPanelChatBtn != null) { this.signalPanelChatBtn.CustomSetActive(true); } this.m_cdButton = new CDButton(this.signalPanelChatBtn); GameObject gameObject = Utility.FindChild(this.m_CUIForm.gameObject, "chatTools/node/InputChat_Buttons"); if (gameObject != null) { gameObject.CustomSetActive(GameSettings.InBattleInputChatEnable == 1 && bPVP); } if (bPVE) { GameObject obj = Utility.FindChild(battleForm.gameObject, "PVPTopRightPanel/panelTopRight/SignalPanel"); obj.CustomSetActive(true); } this.BuildTabList(bPVP); if (bPVP) { this.Refresh_List(InBattleShortcut.TabType.TabShortCut); } this.Refresh_List(InBattleShortcut.TabType.TabReserve); }
public void Clear() { for (int i = 0; i < this.m_cacheNode.Length; i++) { this.m_cacheNode[i] = null; } this.m_cacheNode = null; this.m_nodeUseage = null; this.m_lineNode = null; this.m_buttonNode = null; this.m_campTxt = null; this.m_inputText = null; this.m_inputField.get_onEndEdit().RemoveAllListeners(); this.m_inputField = null; this.m_inCDTxt = (this.m_inWramBattle = null); if (this.m_inputButton != null) { this.m_inputButton.Clear(); } this.m_inputButton = null; this.intimeSendCount = 0; this.intimeMSecond_StartTime = 0uL; }
public void Init(CUIFormScript battleFormScript) { if (battleFormScript == null) { return; } this.m_lineNode = Utility.FindChild(battleFormScript.gameObject, "InputChat_Lines"); CUIFormScript form = Singleton <CUIManager> .instance.GetForm(InBattleShortcut.InBattleMsgView_FORM_PATH); this.m_campTxt = Utility.FindChild(form.gameObject, "chatTools/node/InputChat_Buttons/Button_Camp/Text").GetComponent <Text>(); this.m_buttonNode = Utility.FindChild(form.gameObject, "chatTools/node/InputChat_Buttons"); this.m_inputField = Utility.FindChild(form.gameObject, "chatTools/node/InputChat_Buttons/Button_Input/InputField").GetComponent <InputField>(); this.m_inputText = Utility.FindChild(this.m_inputField.gameObject, "Text"); GameObject gameObject = Utility.FindChild(form.gameObject, "chatTools/node/InputChat_Buttons/Button_Input/CDButton"); if (gameObject != null) { this.m_inputButton = new CDButton(gameObject); } DebugHelper.Assert(this.m_campTxt != null, "---InBattleMsgInputView m_campTxt == null, check out..."); DebugHelper.Assert(this.m_lineNode != null, "---InBattleMsgInputView m_lineNode == null, check out..."); DebugHelper.Assert(this.m_buttonNode != null, "---InBattleMsgInputView m_buttonNode == null, check out..."); DebugHelper.Assert(this.m_inputField != null, "---InBattleMsgInputView m_inputField == null, check out..."); DebugHelper.Assert(this.m_inputText != null, "---InBattleMsgInputView m_inputText == null, check out..."); bool bActive = GameSettings.InBattleInputChatEnable == 1; if (this.m_lineNode != null) { this.m_lineNode.CustomSetActive(bActive); } if (this.m_buttonNode != null) { this.m_buttonNode.CustomSetActive(bActive); } for (int i = 0; i < InBattleInputChat.CHAT_LINE_COUNT; i++) { this.m_cacheNode[i] = Utility.FindChild(battleFormScript.gameObject, string.Format("InputChat_Lines/line{0}", i)); DebugHelper.Assert(this.m_cacheNode[i] != null, "---InBattleMsgInputView m_cacheNode == null, index:" + i); if (this.m_cacheNode[i] != null) { this.m_cacheNode[i].CustomSetActive(false); } } if (this.m_inputField != null) { this.m_inputField.get_onEndEdit().AddListener(new UnityAction <string>(this.On_EndEdit)); } int lineWidth; int fontSize; this.CalcLineWidth(out lineWidth, out fontSize); this.lineWidth = lineWidth; this.fontSize = fontSize; if (!int.TryParse(Singleton <CTextManager> .instance.GetText("InBat_IntimeMaxCount"), ref this.intimeMaxCount)) { DebugHelper.Assert(false, "---InBatMsg jason 你配置的 InBat_IntimeMaxCount 好像不是整数哦, check out"); } if (!int.TryParse(Singleton <CTextManager> .instance.GetText("InBat_IntimeMSecond"), ref this.intimeMSecond)) { DebugHelper.Assert(false, "---InBatMsg jason 你配置的 InBat_IntimeMSecond 好像不是整数哦, check out"); } if (!uint.TryParse(Singleton <CTextManager> .instance.GetText("InBat_IntimeCD"), ref this.intime_cd)) { DebugHelper.Assert(false, "---InBatMsg jason 你配置的 InBat_IntimeCD 好像不是整数哦, check out"); } this.m_inCDTxt = Singleton <CTextManager> .instance.GetText("InBatInput_InCD"); this.m_inWramBattle = Singleton <CTextManager> .instance.GetText("InBatInput_InWarm"); }