Example #1
0
        public void AddLocalMessage(string text)
        {
            ChatMessageEventArgs args = new ChatMessageEventArgs(text, null);

            if (RecordMessages)
            {
                ChatMessages.Add(args);
            }
            MessageReceived?.Invoke(this, args);
        }
Example #2
0
 private void OnMessageReceived(object sender, ChatMessageEventArgs e)
 {
     if (e.MessageSender == null) // local message
     {
         ShowMessage(e.Message);
     }
     else
     {
         ShowMessage(e.MessageSender.NickName + ": " + e.Message);
     }
 }
Example #3
0
        private async void ChatMessageReceived(short textId, PhotonMessageInfo messageInfo)
        {
            string text = await NetworkedStringManager.GetString(textId);

            ChatMessageEventArgs args = new ChatMessageEventArgs(text, messageInfo.Sender);

            if (RecordMessages)
            {
                ChatMessages.Add(args);
            }
            MessageReceived?.Invoke(this, args);
        }