Пример #1
0
    private void Awake()
    {
        if (!alreadyLoaded)
        {
            instance = this;

            #region Instantiate State Machine & Level States

            gameSM              = new GameStateMachine();
            introState          = new GameIntroMenuState(this, gameSM);
            hangarState         = new HangarState(this, gameSM);
            asteroidLevelState  = new AsteroidLevelState(this, gameSM);
            nebulaLevelState    = new NebulaLevelState(this, gameSM);
            blackHoleLevelState = new BlackHoleLevelState(this, gameSM);
            deathState          = new DeathState(this, gameSM);
            highScoresState     = new HighScoresState(this, gameSM);

            #endregion

            #region Create Events

            SceneManager.sceneLoaded += OnSceneLoaded;
            AddEvents();

            #endregion
        }
    }
 public OpenHighScoresCommandHandler(GameStateMachine gameStateMachine, HighScoresState highScoresState)
 {
     _gameStateMachine = gameStateMachine;
     _highScoresState  = highScoresState;
 }