예제 #1
0
    private void Awake()
    {
        stateMachine = new StateMachine <GameState>();
        SetState(GameState.Menu);

        Main main = Main.Instance;

        main.AddListener(this);
    }
예제 #2
0
    void Awake()
    {
        // Disable canvases initially
        menuCanvas.gameObject.SetActive(false);
        gameCanvas.gameObject.SetActive(false);
        deathCanvas.gameObject.SetActive(false);

        Main main = Main.Instance;

        main.AddListener(this);
    }