Пример #1
0
 private void OnUiManagerUpgraded(ICanUpgrade target, IUpgrader upgrader)
 {
     if (_collectedGold >= target.Cost)
     {
         upgrader.Upgrade(target);
     }
 }
        public IUpgradeData GetUpgradeData(ICanUpgrade target)
        {
            var tower = target as DefaultTower;

            if (tower != null)
            {
                var data = GetData(tower);

                return(data);
            }

            return(null);
        }
        public void Upgrade(ICanUpgrade target)
        {
            var data = GetUpgradeData(target);

            target.Upgrade(data);
        }
Пример #4
0
 private void DefaultUpgradeTowerPanelOnUpgradeClicked(ICanUpgrade upgrade, IUpgrader upgrader)
 {
     Upgraded?.Invoke(upgrade, upgrader);
 }