void Start() { buildmanager = BuildManager.GetInstance; nodeUI = buildmanager.nodeUISetter; standartTower = TowersShop.GetTower("Standart"); missleTower = TowersShop.GetTower("Missle"); fireTower = TowersShop.GetTower("Fire"); }
// // Setting text // private void SetSellText() { NodeController node = bm.GetSelectedNode; TowerBlueprint tb = TowersShop.GetTower(node.GetTowerTitle); if (tb != null) { sellText.text = "Sell\n$" + tb.sellCost; } }
private void SetShopText() { TowerBlueprint tbGun = TowersShop.GetTower("Standart"); TowerBlueprint tbMissle = TowersShop.GetTower("Missle"); if (tbGun != null && tbMissle != null) { gunTowerText.text = "Gun tower\n$" + tbGun.cost; MissleTowerText.text = "Missle tower\n$" + tbMissle.cost; } }
public void SellTower() { if (selectedNode != null) { TowerBlueprint towerBlueprint = TowersShop.GetTower(selectedNode.GetTowerTitle); if (towerBlueprint != null) { Destroy(selectedNode.tower); selectedNode.tower = null; PlayerStats.ChangeCurrency(towerBlueprint.sellCost); } } }
public void UpgradeTower() { if (selectedNode != null) { TowerBlueprint towerBlueprint = TowersShop.GetTower("Upgraded " + selectedNode.GetTowerTitle); if (towerBlueprint != null) { if (towerBlueprint != null && selectedNode != null && PlayerStats.ChangeCurrency(-towerBlueprint.cost)) { Destroy(selectedNode.tower); SetTower(towerBlueprint); } } } }
private void SetUpgradeText() { NodeController node = bm.GetSelectedNode; TowerBlueprint tb = TowersShop.GetTower(node.GetTowerTitle); if (tb != null) { if (tb.upgradeCost == 0) { upgradeText.text = "Can't\nupgrade"; } else { upgradeText.text = "Upgrade\n$" + tb.upgradeCost; } } }