public void SendToClients(NetworkMessage incoming) { ClientJoinedMessage message = incoming.ReadMessage <ClientJoinedMessage>(); Usernames.Add(incoming.conn.connectionId, message.Username); NetworkServer.SendToClient(incoming.conn.connectionId, UpdatePlayerAssignment.Code, new UpdatePlayerAssignment() { PlayerId = incoming.conn.connectionId }); }
private void ClientJoinedCallback(ClientJoinedMessage msg, float travelTime) { clients.Add(new MatchClient(msg.ClientGuid, msg.ClientName)); Debug.Log("New client " + msg.ClientName); }
private void OnClientJoinedMessage(NetworkMessage incoming) { ClientJoinedMessage message = incoming.ReadMessage <ClientJoinedMessage> (); chatText.AddText(String.Format(FindObjectOfType <LanguageManager> ().GetString("chat.userJoined"), message.Username)); }