예제 #1
0
        private void InitGameStates()
        {
            var menu             = new Menu(_touchInput, _playerManager, _playerAnimator);
            var start            = new Start(_playerAnimator, _touchInput);
            var normalProcessing = new NormalProgressing(_playerEventsNotifier, _playerController, _breakthroughController);
            var breakthrough     = new Breakthrough(_breakthroughController, _playerEventsNotifier);
            var lost             = new Lost(_levelManager, _lostPopup, _touchInput);
            var finish           = new Finish(_levelManager, _playerAnimator, _touchInput);

            menu.Init(start);
            start.Init(normalProcessing);
            normalProcessing.Init(finish, lost, breakthrough);
            breakthrough.Init(finish, lost, normalProcessing);
            lost.Init(menu);
            finish.Init(menu);

            OnStateChanged(menu);
        }