/// <summary> /// Update a client with player information /// </summary> /// <param name="playerInfo">New information</param> /// <param name="clientToUpdate">Player to update</param> public void UpdatePlayerInfo(Shared_PlayerInfo playerInfo, Server_ServerClient clientToUpdate) { foreach (var client in clients) { if (client == clientToUpdate) { client.info = playerInfo; return; } } }
/// <summary> /// Register the client at the server with the player information /// </summary> /// <param name="playerInfo"></param> public void RegisterAtServer(Shared_PlayerInfo playerInfo) { var msg = new Message_Request_JoinQueue(playerInfo); Send(msg); }
public void AddPlayer(Shared_PlayerInfo playerInfo) { players.Add(playerInfo); }
public Message_Response_GameAllConnected(Shared_PlayerInfo requestingPlayer, List <Shared_PlayerInfo> AllPlayers, double gameClockTime) { this.requestingPlayer = requestingPlayer; this.AllPlayers = AllPlayers; this.gameClockTime = gameClockTime; }
public Message_Response_InQueue(string message, Shared_PlayerInfo playerinfoWithGUID) { this.message = message; this.playerinfoWithGUID = playerinfoWithGUID; }
public Message_Request_JoinQueue(Shared_PlayerInfo playerInfo) { this.playerInfo = playerInfo; }
public void Register(Shared_PlayerInfo info) { this.info = info; }