Ejemplo n.º 1
0
 public void Heal()
 {
     if (potionCount > 0 && playerHealth.currentHealth < playerHealth.maxHealth)
     {
         playerHealth.Heal(10);
         potionCount -= 1;
         lm.SetPotion(potionCount);
         potionText.text = "X " + potionCount;
     }
 }
Ejemplo n.º 2
0
    public void UpPotion()
    {
        if (coin >= upCostPotion)
        {
            lm.SetCoin(lm.GetCoin() - upCostPotion);
            coin          = lm.GetCoin();
            coinText.text = coin.ToString();

            lm.SetPotion(lm.GetPotion() + 1);
            potionText.text = lm.GetPotion().ToString();
        }
    }