public void BuyDrone() { if (CurrentTurret != null) { DeSelectTurret(); } if (money >= DroneCost) { money -= DroneCost; Drone.SetActive(true); DroneBought = true; if (!WaveManager.Instance.WaveStarted) { DronePoints.SetActive(true); } DroneButton.interactable = false; } }
public virtual void SellTurret() { if (CurrentTurret.GetComponent <Radar>()) { ScanRadars(true); Radars.Remove(CurrentTurret.GetComponent <Radar>()); } if (CurrentTurret.GetComponent <FlyingTurret>()) { DronePoints.SetActive(false); DroneButton.interactable = true; Drone.SetActive(false); } else { Destroy(CurrentTurret.gameObject); } money += CurrentTurret.SellPrice; DeSelectTurret(); }