Beispiel #1
0
 public void DrinkMidasPotion()
 {
     if (State.MidasPotions > 0)
     {
         AudioClipPlayer.PlayPotion();
         State.MidasPotions--;
         s_instance.potionEffects.ActivateMidasEffect();
         Cloud.Storage.Save();
     }
 }
Beispiel #2
0
        public void BuyMidasPotion()
        {
            const int price = 100;

            if (Player.State.Coins < price)
            {
                AudioClipPlayer.PlayIncorrect();
                return;
            }

            Player.State.Coins -= price;
            Player.State.MidasPotions++;
            Cloud.Storage.Save();

            AudioClipPlayer.PlayPotion();
            midasCount.text = Player.State.MidasPotions.ToString();
        }