private void Start() { BonusDictionary = new BonusDictionary(); CloseButton.onClick.AddListener(() => { HidePanel(); }); ActiveIncomeBonusBuyButton.onClick.AddListener(() => { GameController.StartActiveIncomeBonusCoroutine(BonusDictionary.GetBonusByKey(1)); HidePanel(); }); PassiveIncomeBonusBuyButton.onClick.AddListener(() => { GameController.StartActiveIncomeBonusCoroutine(BonusDictionary.GetBonusByKey(2)); HidePanel(); }); PassiveIncomeIntervalBonusBuyButton.onClick.AddListener(() => { GameController.StartActiveIncomeBonusCoroutine(BonusDictionary.GetBonusByKey(3)); HidePanel(); }); SetBonusesDescriptions(); SetBonusesPrices(); }
public void IncreasePassiveIncome() { if (CanAffordPassiveIncomeUpgrade() && IsPassiveIncomeUpgradeAvailable()) { UpgradesController.IncreasePassiveIncome(ref GetPassiveIncomeRef(), ref GetPreBonusPassiveIncomeRef()); OverwriteValuesWithBonus(BonusDictionary.GetBonusByKey(2), ref GetPassiveIncomeRef(), ref GetPreBonusPassiveIncomeRef()); DeductUpdateFee(UpgradesController.NextPassiveIncomeUpgradeCost); UpgradesController.SetNextPassiveIncomeUpgradeCost(); } }
private void DefineInteractibleButtons() { ActiveIncomeBonusBuyButton.interactable = GameController.CanBonusBeUsed(BonusDictionary.GetBonusByKey(1)); PassiveIncomeBonusBuyButton.interactable = GameController.CanBonusBeUsed(BonusDictionary.GetBonusByKey(2)); PassiveIncomeIntervalBonusBuyButton.interactable = GameController.CanBonusBeUsed(BonusDictionary.GetBonusByKey(3)); }