using UnityEngine; public class GameManager : MonoBehaviour { public float Balance = 0; public static GameManager Instance; public bool IsBuildMode = false; private Tower selectedTower; public TowerInfo ShopSelectedTower; public Tower SelectedTower { get { return selectedTower; } set { if (selectedTower != null) selectedTower.TowerSelected(false); selectedTower = value; if (selectedTower != null) selectedTower.TowerSelected(true); }} private void Awake() { if (Instance != this) Destroy(Instance); Instance = this; } }