private void Awake() { stateMachine = new StateMachine <GameState>(); SetState(GameState.Menu); Main main = Main.Instance; main.AddListener(this); }
void Awake() { // Disable canvases initially menuCanvas.gameObject.SetActive(false); gameCanvas.gameObject.SetActive(false); deathCanvas.gameObject.SetActive(false); Main main = Main.Instance; main.AddListener(this); }