Example #1
0
        private void Start()
        {
            widgetManager.ShowWidget(defaultWidget);

            topBarWidget.EnableTowerWidget.onClick.AddListener(EnableTowerWidgets);
            topBarWidget.EnablePlayerWidget.onClick.AddListener(EnablePlayerWidgets);
            bottomBarWidget.Stats.onClick.AddListener(ShowStatsWidget);
            bottomBarWidget.Abilities.onClick.AddListener(ShowAbilitiesWidget);

            towerStatsWidget.Damage.upgradeStat.onClick.AddListener(() => UpgradeBaseAction(BaseUpgradeType.Damage));
            towerStatsWidget.Health.upgradeStat.onClick.AddListener(() => UpgradeBaseAction(BaseUpgradeType.Health));
            towerStatsWidget.FireRate.upgradeStat.onClick.AddListener(() => UpgradeBaseAction(BaseUpgradeType.FireRate));
            towerStatsWidget.SlowDownFactor.upgradeStat.onClick.AddListener(() => UpgradeBaseAction(BaseUpgradeType.SlowDown));
            //topBarWidget.Money.upgradeStat.onClick.AddListener(() => UpgradeAction(BaseUpgradeType.Money));
        }