Пример #1
0
        public void UpgradeToNextLevel()
        {
            if (this.CanUpgrade())
            {
                foreach (var resourceUnlockCondition in this.m_wellUpgradeData.ResourceUnlockConditions)
                {
                    resourceUnlockCondition.Resource.ResourceController.TryUseResource(resourceUnlockCondition.Amount);
                }
            }

            this.m_currentProductionTimer = this.m_wellUpgradeData.NewProductionTime;

            foreach (var buildingToUnlock in this.m_wellUpgradeData.BuildingsToUnlock)
            {
                buildingToUnlock.Unlock();
            }

            this.CurrentLevel++;
            this.m_wellUpgradeData = this.m_wellUpgradeData.FollowingUpgrade;

            if (this.m_wellUpgradeData == null)
            {
                GameHUD.Instance.ShowWinScreen();
            }
        }
Пример #2
0
 public void ShowProductionTime(WellUpgradeData toShow)
 {
     this.m_rewardText.text = $"Well: {toShow.NewProductionTime}s";
     this.m_image.sprite    = this.m_timerIcon;
 }