コード例 #1
0
 public void AddGlobalChatItem(MyGlobalChatItem chatItem)
 {
     if (m_globalChatHistory.Chat.Count == MyChatConstants.MAX_GLOBAL_CHAT_HISTORY_COUNT)
     {
         m_globalChatHistory.Chat.Dequeue();
     }
     m_globalChatHistory.Chat.Enqueue(chatItem);
 }
コード例 #2
0
 public void Init(MyObjectBuilder_GlobalChatHistory chatBuilder)
 {
     if (chatBuilder.Chat != null)
     {
         m_chat = new Queue <MyGlobalChatItem>(chatBuilder.Chat.Count);
         foreach (var chatItem in chatBuilder.Chat)
         {
             MyGlobalChatItem newChatItem = new MyGlobalChatItem();
             newChatItem.Init(chatItem);
             m_chat.Enqueue(newChatItem);
         }
     }
     else
     {
         m_chat = new Queue <MyGlobalChatItem>();
     }
 }
コード例 #3
0
ファイル: MyChatSystem.cs プロジェクト: 2asoft/SpaceEngineers
 public static void AddGlobalChatItem(long localPlayerId, MyGlobalChatItem chatItem)
 {
     GetChatHistory(localPlayerId).AddGlobalChatItem(chatItem);
 }
コード例 #4
0
 public void Init(MyObjectBuilder_GlobalChatHistory chatBuilder)
 {
     if (chatBuilder.Chat != null)
     {
         m_chat = new Queue<MyGlobalChatItem>(chatBuilder.Chat.Count);
         foreach (var chatItem in chatBuilder.Chat)
         {
             MyGlobalChatItem newChatItem = new MyGlobalChatItem();
             newChatItem.Init(chatItem);
             m_chat.Enqueue(newChatItem);
         }
     }
     else
     {
         m_chat = new Queue<MyGlobalChatItem>();
     }
 }
コード例 #5
0
 public void AddGlobalChatItem(MyGlobalChatItem chatItem)
 {
     if (m_globalChatHistory.Chat.Count == MyChatConstants.MAX_GLOBAL_CHAT_HISTORY_COUNT)
     {
         m_globalChatHistory.Chat.Dequeue();
     }
     m_globalChatHistory.Chat.Enqueue(chatItem);
 }