public void InitView(GameObject cdButton, CUIFormScript formScript) { if (formScript == null) { return; } this.m_formScript = formScript; SLevelContext curLvelContext = Singleton <BattleLogic> .instance.GetCurLvelContext(); if (curLvelContext == null) { return; } if (this.IsMultiGame()) { this.m_shortcutChat = new InBattleShortcut(); this.m_shortcutChat.CacheForm(formScript, true, false); this.m_InputChat = new InBattleInputChat(); this.m_InputChat.Init(formScript); } else if (curLvelContext.IsGameTypeAdventure() || curLvelContext.IsGameTypeBurning() || curLvelContext.IsGameTypeArena() || curLvelContext.IsGameTypeComBat()) { this.m_shortcutChat = new InBattleShortcut(); this.m_shortcutChat.CacheForm(formScript, false, true); } else if (cdButton != null) { cdButton.CustomSetActive(false); } }
public void Clear() { this.UnRegInBattleEvent(); this.inbatEntList.Clear(); if (this.m_shortcutChat != null) { this.m_shortcutChat.Clear(); } this.m_shortcutChat = null; if (this.m_InputChat != null) { this.m_InputChat.Clear(); } this.m_InputChat = null; this.m_formScript = null; }
public void InitView(GameObject cdButton, CUIFormScript formScript) { if (formScript != null) { this.m_formScript = formScript; if (this.IsEnableShortcut()) { this.m_shortcutChat = new InBattleShortcut(); this.m_shortcutChat.OpenForm(formScript, null, false); this.m_InputChat = new InBattleInputChat(); this.m_InputChat.Init(formScript); } else if (cdButton != null) { cdButton.CustomSetActive(false); } } }
public static void ShowInBattleMsg(COM_INBATTLE_CHAT_TYPE type, ulong playerid, uint heroID, string content, string sound) { if (type == COM_INBATTLE_CHAT_TYPE.COM_INBATTLE_CHATTYPE_SIGNAL) { CSignalTips_InBatMsg obj = new CSignalTips_InBatMsg(playerid, heroID, content, sound); Singleton <CBattleSystem> .instance.FightForm.GetSignalPanel().Add_SignalTip(obj); InBattleMsgUT.PlaySound(sound, playerid); } else if (type == COM_INBATTLE_CHAT_TYPE.COM_INBATTLE_CHATTYPE_BUBBLE) { InBattleMsgUT.ShowBubble(playerid, heroID, content); InBattleShortcut shortcutChat = Singleton <InBattleMsgMgr> .instance.m_shortcutChat; if (shortcutChat != null) { shortcutChat.UpdatePlayerBubbleTimer(playerid, heroID); } InBattleMsgUT.PlaySound(sound, playerid); } }