Exemplo n.º 1
0
 /// <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);
 }
Exemplo n.º 4
0
 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;
 }
Exemplo n.º 6
0
 public Message_Request_JoinQueue(Shared_PlayerInfo playerInfo)
 {
     this.playerInfo = playerInfo;
 }
Exemplo n.º 7
0
 public void Register(Shared_PlayerInfo info)
 {
     this.info = info;
 }