コード例 #1
0
ファイル: Table.cs プロジェクト: ErbaevN/GraduationProject
 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.
 }
コード例 #2
0
ファイル: PlayerList.cs プロジェクト: SanecMan/Reborn-RU-CM
 /// <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!");
     }
 }