25 lines
583 B
C#
25 lines
583 B
C#
using UnityEngine;
|
|
|
|
public class GameManager : MonoBehaviour
|
|
{
|
|
public static GameManager Instance;
|
|
|
|
public bool IsBuildMode = false;
|
|
private Tower selectedTower;
|
|
public Tower SelectedTower { get { return selectedTower; } set {
|
|
if (selectedTower != null)
|
|
selectedTower.TowerSelected(false);
|
|
|
|
selectedTower = value;
|
|
selectedTower.TowerSelected(true);
|
|
Debug.Log($"Selected: {selectedTower}");
|
|
}}
|
|
|
|
private void Awake()
|
|
{
|
|
if (Instance != this)
|
|
Destroy(Instance);
|
|
Instance = this;
|
|
}
|
|
}
|