Example #1
0
    private void Awake()
    {
        _controller = GetComponent <LevelController>();

        SetupState  = new LevelSetupState(this, _controller);
        IntroState  = new LevelIntroState(this, _controller);
        ActiveState = new LevelActiveState(this, _controller);
        PauseState  = new LevelPauseState(this);
        WinState    = new LevelWinState(this, _controller);
        LoseState   = new LevelLoseState(this, _controller);
    }
	void Awake()
	{
		Instance = this;

		mainMenuState = new MainMenuState(this);
		levelSelectionState = new LevelSelectionState(this);
		levelGameState = new LevelGameState(this);
		levelLoseState = new LevelLoseState(this);
		levelWonState = new LevelWonState(this);
		levelExitState = new ExitGameState(this);

		if (!levelManager)
		{
			levelManager = LevelsManager.Instance;
		}
	}