Example #1
0
        /// <summary>
        /// Looks for a player with the specified endpoint.
        /// </summary>
        /// <param name="playerEndpoint">The player endpoint.</param>
        /// <returns>The <see cref="ServerPlayer"/> if the player can be found; otherwise, null.</returns>
        public ServerPlayer FindPlayer(NetworkEndpoint playerEndpoint)
        {
            ServerPlayer player;

            this.connectedPlayers.TryGetValue(playerEndpoint.GetHashCode(), out player);

            return(player);
        }