public void AddUser(User user) { if (user.Email != null) { if (Size > Users.Count && user.Coins >= 10000) { user.Coins -= 10000; user.CoinsTable += 10000; Users.Add(user); ReadyPlayers.Add(user); user.PlayIntable = this; } } //Strings += "Игрок "+ User. }
/// <summary> /// Makes a player ready/unready for job allocations /// </summary> public void SetPlayerReady(ConnectedPlayer player, bool isReady, CharacterSettings charSettings = null) { if (isReady) { // Update connection with locked in job prefs if (charSettings != null) { player.CharacterSettings = charSettings; } else { Logger.LogError($"{player.Username} was set to ready with NULL character settings:\n{player}"); } ReadyPlayers.Add(player); Logger.Log($"Set {player.Username} to ready with these character settings:\n{charSettings}"); } else { ReadyPlayers.Remove(player); Logger.Log($"Set {player.Username} to NOT ready!"); } }