Ejemplo n.º 1
0
        public void OnChatMessage(ChatMessageReceivedEvent e)
        {
            if (e.IsChat())
            {
                return;
            }

            switch (e.Type)
            {
            case MessageType.Popup:
                Popup.Text      = e.ChatObject.RawMessage;
                PopupHideTime   = DateTime.UtcNow + TimeSpan.FromSeconds(3);
                Popup.IsVisible = true;

                break;

            case MessageType.Tip:
                Tip.Text      = e.ChatObject.RawMessage;
                TipHideTime   = DateTime.UtcNow + TimeSpan.FromSeconds(3);
                Tip.IsVisible = true;

                break;
            }

            DoUpdate = true;
        }
 public void ShowReceivedMessage(ChatMessageReceivedEvent e, ChatNode chatNode, [JoinAll] SelfUserNode selfUser)
 {
     if (e.SystemMessage)
     {
         base.NewEvent(new BattleChatSystemMessageReceivedEvent(e.Message)).Attach(chatNode).Schedule();
     }
     else if (!selfUser.blackList.BlockedUsers.Contains(e.UserId))
     {
         base.NewEvent(new BattleChatValidMessageReceivedEvent(e.Message, e.UserId)).Attach(chatNode).Schedule();
     }
 }
 private async Task PersistChatMessagesToDBAsync(ChatMessageReceivedEvent e)
 {
     await System.Console.Out.WriteLineAsync($"Chat message received and persisted: {e.Message}");
 }
        protected void OnChatMessageReceived(SocketIOEvent e)
        {
            ChatMessageReceivedEvent cmre = JsonConvert.DeserializeObject <ChatMessageReceivedEvent>(e.data);

            eventManager.DispatchEvent <ChatMessageReceivedEvent>(cmre);
        }
Ejemplo n.º 5
0
 protected void OnChatMessageReceived(ChatMessageReceivedEvent e)
 {
     chatTextField.text += e.PlayerName + ": " + e.ChatMessage + "\n\r";
 }
 public void Publish(ChatMessageReceivedEvent eventMessage)
 {
     _subject.OnNext(eventMessage);
 }
Ejemplo n.º 7
0
 public void Publish(ChatMessageReceivedEvent receiveEvent)
 {
     _subject.OnNext(receiveEvent);
 }