示例#1
0
        private void Process(ClientCommandChat msg)
        {
            RemotePlayer player;

            if (remotePlayers.TryGetValue(msg.id, out player))
            {
                playerChat.WriteMessage(player.username + ": " + msg.text);
            }
        }
示例#2
0
文件: Logic.cs 项目: senlace/shinkai
 public static void SendChat(string text)
 {
     if (Multiplayer.main.blocked == false)
     {
         var res = new ClientCommandChat();
         res.id   = Multiplayer.main.self.id;
         res.text = text;
         Multiplayer.main.Send(res);
     }
 }
示例#3
0
文件: Server.cs 项目: senlace/shinkai
 private void Process(Client client, ClientCommandChat msg)
 {
     msg.id = client.id;
     SendToAll(client.peer, msg);
 }