} // todo: update play stats public void SelectNode(Tile tile) { if (selectedNode == tile) { DeselectNode(); return; } selectedNode = tile; turretToBuild = null; //nodeUI.SetTarget(tile); //todo: update nodeUI }
void BuildTurret(TurretToBuild turretToBuildLocal) { if (playerInfo.Money < turretToBuildLocal.cost) { playerInfo.notificationTextToDisplay = "Not enough money to build that!"; playerInfo.notificationTextToDisplayNotified = true; return; } GameObject _turret = (GameObject)Instantiate(turretToBuildLocal.prefab, GetBuildPosition(), Quaternion.identity); turretOnTile = _turret; turretToBuild = turretToBuildLocal; playerInfo.Money -= turretToBuildLocal.cost; shoppingSuccessAudio.Play(); }
public void SelectTurretToBuild(TurretToBuild turret) { turretToBuild = turret; DeselectNode(); }