fCraft.MineField.PlayerBlowUpCheck C# (CSharp) Méthode

PlayerBlowUpCheck() public static méthode

public static PlayerBlowUpCheck ( Player player ) : bool
player Player
Résultat bool
        public static bool PlayerBlowUpCheck( Player player )
        {
            if ( !Failed.Contains( player ) ) {
                Failed.Add( player );
                return true;
            }
            return false;
        }

Usage Example

 public void HitPlayer(World world, Player hitted, Player by)
 {
     if (by == null)
     {
         if (MineField.Failed != null && !MineField.Failed.Contains(hitted))
         {
             hitted.Kill(world, String.Format("{0}&S was torn to pieces and lost the game!", hitted.ClassyName));
             if (MineField.PlayerBlowUpCheck(hitted))
             {
                 hitted.Message("&WYou lost the game! You are now unable to win.");
             }
             return;
         }
         else
         {
             return;
         }
     }
     hitted.Kill(world, String.Format("{0}&S was torn to pieces by {1}", hitted.ClassyName, hitted.ClassyName == by.ClassyName?"theirself":by.ClassyName));
 }