public void SetTarget(Red_Node _target) { target = _target; transform.position = target.GetBuildPosition(); ui.SetActive(true); sellAmount.text = "Sell\n" + "$" + target.turretBlueprint.GetSellAmount(); }
public void BuildTurretOn(Red_Node node) { if (RedPlayerStats.Money < turretToBuild.cost) { Debug.Log("Not enough money to build turret!!"); return; } RedPlayerStats.Money -= turretToBuild.cost; GameObject turret = (GameObject)Instantiate(turretToBuild.prefab, node.GetBuildPosition(), Quaternion.identity); node.turret = turret; Debug.Log("Money Left:" + RedPlayerStats.Money); }