// Use this for initialization void Start() { tacoCounter = GameObject.FindObjectOfType<TacoCounter>(); upgradeButtonController = GetComponent<UpgradeButtonController>(); soundController = GameObject.FindObjectOfType<SoundController>(); tapPowLevel = ProgressController.GetTapPowerLevel(); CalculateTapPower(); UpdateLevelUpData(); UpdateUI(); }
public void BuyStuff(UpgradeButtonModel model, UpgradeButtonController controller) { if (SpendCookies(model.Cost)) { controller.Purchase(PurchaseAmount); UpdateCookiesPerSecond(); } //Cost for purchasing more than 1 is currently not being adjusted correctly else { controller.ShowErrorCookiesMissing((model.Cost - Cookies)); } }
// Use this for initialization void Start() { tacoCounter = GameObject.FindObjectOfType<TacoCounter>(); upgradeButtonController = GetComponent<UpgradeButtonController>(); discardedObjectController = GameObject.FindObjectOfType<DiscardedObjectController>(); soundController = GameObject.FindObjectOfType<SoundController>(); passiveLevel = ProgressController.GetPassive1Level(); Debug.Log(passiveLevel); CalculateRateOfGrowth(); UpdateLevelUpData(); UpdateUI(); }