Esempio n. 1
0
    //------------------------------------------Explosive Ball----------------------------------------------------------

    private void DisplayExplosiveBallCost() //If price is max, display OUT OF STOCK instead of price and disable button
    {
        if (PlayerPrefsController.GetExplosiveBallCost() > explosiveBallCost)
        {
            explosiveBallCostText.text = "OUT OF STOCK";
            explosiveBallButton.GetComponent <Button>().interactable = false;
        }
        else
        {
            explosiveBallCostText.text = "$" + PlayerPrefsController.GetExplosiveBallCost().ToString();
        }
    }
Esempio n. 2
0
 public void BuyExplosiveBall() //Activate explosive ball, update currency total, change price
 {
     if (PlayerPrefsController.GetTotalCurrency() >= PlayerPrefsController.GetExplosiveBallCost())
     {
         currency.BuyUpgrade(PlayerPrefsController.GetExplosiveBallCost());
         UpdateCurrency();
         powerupsAndLives.EnableExplosiveBall();
         NewExplosiveBallPrice();
     }
     else
     {
         return;
     }
 }