コード例 #1
0
 public void PlayerExplode(Player player, double time, ScoreboardTemplate scoreboard, Player bombOwner)
 {
     if (!(player.invincibleUntil > time))
     {
         player.BecomeInvincible(time);
         player.ReduceHealth();
         if (player != bombOwner)
         {
             if (player.IsAlive())
             {
                 scoreboard.AddScore(bombOwner, 1);
             }
             else
             {
                 scoreboard.AddScore(bombOwner, 3);
                 scoreboard.ChangeStatus(player);
             }
         }
         else
         {
             if (player.IsAlive())
             {
                 scoreboard.AddScore(player, -1);
             }
             else
             {
                 scoreboard.AddScore(player, -1);
                 scoreboard.ChangeStatus(player);
             }
         }
     }
 }