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);
            }
        }
Пример #2
0
        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 msg = new CSignalTips_InBatMsg(playerid, heroID, content, sound);
                Singleton <CBattleSystem> .instance.GetSignalPanel().Add_SignalTip(msg);

                if (!string.IsNullOrEmpty(sound))
                {
                    Singleton <CSoundManager> .GetInstance().PlayBattleSound(sound, null);
                }
            }
            else if (type == COM_INBATTLE_CHAT_TYPE.COM_INBATTLE_CHATTYPE_BUBBLE)
            {
                ShowBubble(playerid, heroID, content);
                Singleton <InBattleMsgMgr> .instance.UpdatePlayerBubbleTimer(playerid, heroID);

                if (!string.IsNullOrEmpty(sound))
                {
                    Singleton <CSoundManager> .GetInstance().PlayBattleSound(sound, null);
                }
            }
        }