Exemple #1
0
        private void TryUpgradeTower(ITower tower)
        {
            var price = tower.GetUpgradePrice();

            if (price > _context.Gold)
            {
                return;
            }

            _context.Gold -= price;
            tower.Upgrade();
        }
 public void UpgradeTower(ITower tower)
 {
     tower.Upgrade();
     Cash -= _towerPrices[tower.Id][tower.Level];
 }