Esempio n. 1
0
    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();
    }
Esempio n. 2
0
    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();
    }