public void SellTower() { PlayerManager.Crate += towerBluePrint.GetSellAmount(); Destroy(tower); isUpgraded = false; towerBluePrint = null; }
void BuildTurret(TowerBluePrint blueprint, Vector3 position) { GameObject _tower = (GameObject)Instantiate(blueprint.prefab, position, Quaternion.identity); tower = _tower; Debug.Log("Tower build!"); towerCount++; }
public void SelectNode(Node node) { if (selectedNode == node) { DeselectNode(); return; } selectedNode = node; towerToBuild = null; nodeUI.SetTarget(node); }
void BuildTower(TowerBluePrint blueprint) { if (PlayerManager.Crate < blueprint.crateCost) { Debug.Log("Not enough money."); return; } PlayerManager.Crate -= blueprint.crateCost; SoundManager.PlaySound("upgrade"); GameObject _tower = (GameObject)Instantiate(blueprint.prefab, GetBuildPosition(), Quaternion.identity); tower = _tower; towerBluePrint = blueprint; Debug.Log("Tower build!"); }
public void SelectTowerToBuild(TowerBluePrint tower) { towerToBuild = tower; }
public void SelectTowerToBuild(TowerBluePrint tower) { //tower.prefab.GetComponent<Tower>(). towerToBuild = tower; }
public void SelectTowerToBuild(TowerBluePrint tower) { towerToBuild = tower; DeselectNode(); }