Exemplo n.º 1
0
    //------------------------------------------LONGER PADDLE----------------------------------------------------------

    private void DisplayLongerPaddleCost() //If price is max, display OUT OF STOCK instead of price and disable button
    {
        if (PlayerPrefsController.GetLongerPaddleCost() > longerPaddleCost1)
        {
            longerPaddleCostText.text = "OUT OF STOCK";
            paddleButton.GetComponent <Button>().interactable = false;
        }
        else
        {
            longerPaddleCostText.text = "$" + PlayerPrefsController.GetLongerPaddleCost().ToString();
        }
    }
Exemplo n.º 2
0
 private void NewPaddleLengthPrice() //Change price based on how many times bought
 {
     if (PlayerPrefsController.GetLongerPaddleCost() == longerPaddleCost0)
     {
         PlayerPrefsController.SetLongerPaddleCost(longerPaddleCost1);
         UpdateLongerPaddleCost();
     }
     else if (PlayerPrefsController.GetLongerPaddleCost() >= longerPaddleCost1)
     {
         PlayerPrefsController.SetLongerPaddleCost(longerPaddleCost1 + 1);
         paddleButton.GetComponent <Button>().interactable = false;
         longerPaddleCostText.text = "OUT OF STOCK";
     }
 }
Exemplo n.º 3
0
 public void BuyLongerPaddle() //Increase paddle length, update currency total, change price
 {
     if (PlayerPrefsController.GetTotalCurrency() >= PlayerPrefsController.GetLongerPaddleCost())
     {
         currency.BuyUpgrade(PlayerPrefsController.GetLongerPaddleCost());
         UpdateCurrency();
         powerupsAndLives.IncreasePaddleSize();
         NewPaddleLengthPrice();
     }
     else
     {
         return;
     }
 }
Exemplo n.º 4
0
 private void UpdateLongerPaddleCost() //Updates cost of buying a longer paddle
 {
     longerPaddleCostText.text = "$" + PlayerPrefsController.GetLongerPaddleCost();
 }