public void BuyBird() { if (!thisBird.owned) { if (thisBird.visible) { if (system.GetCoins() >= thisBird.price) { system.SetCoins(system.GetCoins() - thisBird.price); SetCurrBird(); GetComponent <Image>().sprite = birdSprite; priceText.gameObject.SetActive(false); thisBird.owned = true; //Full color ButtonFade(1f); shop.SetBirdOwned(thisBird.index); if (thisBird.tier == 1) { shop.SetNextSkinVisible(thisBird.index); } if (thisBird.tier == 0) { shop.SetNextBirdVisible(thisBird.index); } } else { StartCoroutine(Expensive()); } } else { StartCoroutine(Locked()); } } else { SetCurrBird(); } }
void OpenMainMenu() { coinsText.text = "Coins: " + system.GetCoins(); hsText.text = "High Score: " + system.GetHS(); mainMenu.SetActive(true); }