Example #1
0
        private void GameClientOnChatPlayerMessage(VsadilNestihl.Networking.Messages.Chat.ChatPlayerMessage chatPlayerMessage)
        {
            var lobbyPlayer = _lobbyPlayers.Find(x => x.PlayerId == chatPlayerMessage.PlayerId);

            if (lobbyPlayer == null)
            {
                return;
            }

            ChatPlayerMessage?.Invoke(lobbyPlayer, chatPlayerMessage.Message);
        }
Example #2
0
        private void ChatSendMessage(LobbyPlayer player, string message)
        {
            if (message.Length > 1000)
            {
                return;
            }

            ChatPlayerMessage?.Invoke(player, message);

            var chatPlayerMessage = new VsadilNestihl.Networking.Messages.Chat.ChatPlayerMessage(player.PlayerId, message);

            foreach (var lobbyPlayer in GetAllLobbyPlayers().Where(x => x.PlayerHandler != null))
            {
                lobbyPlayer.PlayerHandler.ChatPlayerMessage(chatPlayerMessage);
            }
        }
Example #3
0
 private void GameClientOnChatPlayerMessage(VsadilNestihl.Networking.Messages.Chat.ChatPlayerMessage chatPlayerMessage)
 {
     _gameView.ChatPlayerMessage(chatPlayerMessage.PlayerId, chatPlayerMessage.Message);
 }
Example #4
0
 public void ChatPlayerMessage(VsadilNestihl.Networking.Messages.Chat.ChatPlayerMessage chatPlayerMessage)
 {
     Receiver.SendMessage(chatPlayerMessage);
 }