Пример #1
0
    public void Upgrade()
    {
        if (Currencies.Gold < price)
        {
            return;
        }

        Currencies.AddGold(-price);
        GameObject lvlUp = Instantiate(nextLvl, transform.position, transform.rotation);

        Destroy(gameObject);
        Selector.Deselect();
    }
Пример #2
0
 public void AddGold(int amount)
 {
     Currencies.AddGold(amount);
 }
Пример #3
0
 public void Sell()
 {
     Currencies.AddGold(price);
     Destroy(gameObject);
     Selector.Deselect();
 }