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(); }
void Start() { UpgradesController = new UpgradesController(); BonusDictionary = new BonusDictionary(); PreBonusActiveIncome = ActiveIncome; PreBonusPassiveIncome = PassiveIncome; PreBonusPassiveIncomeInterval = PassiveIncomeInterval; UpgradesController.InitializeUpdatesCount(); UpgradesController.SetNextActiveIncomeUpgradeCost(ActiveIncome); UpgradesController.SetNextPassiveIncomeUpgradeCost(); UpgradesController.SetNextPassiveIncomeIntervalUpgradeCost(); UpdateAllTexts(); StartPassiveIncomeCoroutine(); }