Esempio n. 1
0
 public void handleBonus(Bonus bonus)
 {
     Bonus activeBonus = findActiveBonusOfType(bonus);
     if (activeBonus)
     {
         activeBonus.TimeLeft += bonus.Duration + bonus.Duration * player.Stats.IncreasedBonusDuration;
         bonus.destroy();
     }
     else
     {
         activeBonuses.Add(bonus);
         bonusesPanel.addBonus(bonus);
         bonus.TimeLeft = bonus.Duration + bonus.Duration * player.Stats.IncreasedBonusDuration;
         bonus.activate();
     }
 }