Esempio n. 1
0
        internal void AddPlayer(InnerPlayerControl control)
        {
            var playerId   = control.PlayerId;
            var playerInfo = new InnerPlayerInfo(control.PlayerId);

            if (_allPlayers.TryAdd(playerId, playerInfo))
            {
                control.PlayerInfo = playerInfo;
            }
        }
Esempio n. 2
0
        internal InnerPlayerInfo?AddPlayer(InnerPlayerControl control)
        {
            var playerId   = control.PlayerId;
            var playerInfo = new InnerPlayerInfo(control.PlayerId);

            if (_allPlayers.TryAdd(playerId, playerInfo))
            {
                return(playerInfo);
            }

            return(null);
        }
Esempio n. 3
0
 internal void RemovePlayer(InnerPlayerControl control)
 {
     _allPlayers.TryRemove(control.PlayerInfo.PlayerId, out _);
 }