Пример #1
0
 public void SellTower()
 {
     if (SelectedTower != null)
     {
         SelectedTower.Toggle();
         Currency += SelectedTower.Price / 2;
         SelectedTower.GetComponentInParent <TileScript>().IsEmpty = true;
         Destroy(SelectedTower.gameObject);
     }
 }
Пример #2
0
 private void HandleEscape()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         SoundManager.Instance.PlayAudio("TowerNotPlaced");
         Hover.Instance.Deactivate();
         if (SelectedTower != null)
         {
             SelectedTower.Toggle();
         }
     }
 }