Пример #1
0
 public void UsePotion()
 {
     if (currentPotions <= 0)
     {
         currentPotions = 0;
         SFXManager.SharedInstance.PlaySFX(SFXType.SoundType.UI_MENU_ERROR);
         return;
     }
     currentPotions--;
     playerHealthManager.AddHealthPoints(potionvalue);
     SFXManager.SharedInstance.PlaySFX(SFXType.SoundType.USE_ITEM);
     if (currentPotions < 0)
     {
         currentPotions = 0;
     }
 }