Exemplo n.º 1
0
 public void RemovePlayer(GamePeer peer)
 {
     lock (playerLock)
     {
         PlayerKey pKey = PlayerKey.MakeFromPeer(peer);
         playersDic.Remove(pKey);
     }
 }
Exemplo n.º 2
0
        public Player GetPlayer(GamePeer peer)
        {
            PlayerKey key = PlayerKey.MakeFromPeer(peer);

            if (playersDic.ContainsKey(key))
            {
                return(playersDic[key]);
            }

            return(null);
        }
Exemplo n.º 3
0
 public Player(GamePeer peer, PlayerInfo info)
 {
     this.peer = peer;
     this.key = PlayerKey.MakeFromPeer(peer);
     this.name = info.username;
 }
Exemplo n.º 4
0
 public Player(GamePeer peer, PlayerInfo info)
 {
     this.peer = peer;
     this.key  = PlayerKey.MakeFromPeer(peer);
     this.name = info.username;
 }