public void SellTurret() { PlayerStats.money += turretBlueprint.GetSellPrice(); GameObject effect = (GameObject)Instantiate(buildManager.sellEffect, GetBuildPosition(), Quaternion.identity); Destroy(effect, 5f); Destroy(turret); turretBlueprint = null; }
public void SellTurret() { PlayerStats.Money += turretBlueprint.GetSellPrice(); // get rid of turret Destroy(turret); isUpgraded = false; turretBlueprint = null; // also create a particle effect CreateEffect(buildManager.sellEffect); Debug.Log("Turret sold!"); }