Exemple #1
0
        private void Start()
        {
            Input.multiTouchEnabled = false;

            _activeRings      = new List <Ring>();
            _gameStateMachine = new StateMachine <GameState>();
            _gameStateMachine.AddTransition(GameState.Idle, GameState.Play, StartGame);
            _gameStateMachine.AddTransition(GameState.Play, GameState.Stop, StopGame);
            _gameStateMachine.AddTransition(GameState.Stop, GameState.Play, StartGame);
            _gameStateMachine.SetState(GameState.Idle);

            _ringsPrefabs = _ringsStorage.GetRingsPrefabs();

            if (_navigation != null)
            {
                _navigation.OpenScreen <StartPage>();
            }
            else
            {
                Debug.LogError("NavigationProvider is not assigned");
            }
        }
Exemple #2
0
        protected override void Awake()
        {
            base.Awake();

            _playerInputHandler = GetComponent <PlayerInputHandler>();
            _gameStateMachine   = CreateStateMachine();

            GameData.Load();
            _navigationProvider.OpenScreen <StartPage>();
        }