Exemplo n.º 1
0
        public void Init(GameData data)
        {
            //pre-conditions
            Assert.AreNotEqual(null, data);

            _carConstructor = Core.Instance.GetService <CarConstructor>();
            Assert.AreNotEqual(null, _carConstructor);

            _gameManager = Core.Instance.GetService <GameManager>();
            Assert.AreNotEqual(null, _gameManager);

            _playerManager = Core.Instance.GetService <PlayerManager>();
            Assert.AreNotEqual(null, _playerManager);

            _safePlayerPrefs = Core.Instance.GetService <SafePlayerPrefs>();
            Assert.AreNotEqual(null, _safePlayerPrefs);

            //
            _uiManager = Core.Instance.GetService <UIManager>();
            Assert.AreNotEqual(null, _uiManager);

            _gameWindow = _uiManager.GetWindow(UIWindowEnum.GAMEWINDOW_TUTORIAL) as GameWindowTutorial;
            Assert.AreNotEqual(null, _gameWindow);

            _pauseWindow = _uiManager.GetWindow(UIWindowEnum.PAUSE_TUTORIAL) as PauseWindow;
            Assert.AreNotEqual(null, _pauseWindow);

            _retryWindow = _uiManager.GetWindow(UIWindowEnum.RETRY_TUTORIAL) as RetryWindow;
            Assert.AreNotEqual(null, _retryWindow);

            _finishWindow = _uiManager.GetWindow(UIWindowEnum.FINISH_TUTORIAL) as FinishWindow;
            Assert.AreNotEqual(null, _finishWindow);

            _trigersTutorial = _uiManager.GetWindow(UIWindowEnum.TRIGERS_TUTORIAL) as TrigersTutorial;
            Assert.AreNotEqual(null, _trigersTutorial);

            _audioService = Core.Instance.GetService <AudioService>();
            Assert.AreNotEqual(null, _audioService);

            _uiManager.ShowWindow(UIWindowEnum.SPLASH, false);

            //
            _gameData = data;
            _uiManager.ShowWindow(UIWindowEnum.SPLASH, true);
            _gameManager.LoadTrack(OnTrackLoaded);
        }
Exemplo n.º 2
0
        private void Init_Tutorial_Game()
        {
            _gameWindowsTutorial = GetComponentInChildren <_Tutorial.GameWindowTutorial>();
            Assert.AreNotEqual(null, _gameWindowsTutorial);

            _pauseWindowTutorial = GetComponentInChildren <_Tutorial.PauseWindow>();
            Assert.AreNotEqual(null, _pauseWindowTutorial);

            _finishWindowTutorial = GetComponentInChildren <_Tutorial.FinishWindow>();
            Assert.AreNotEqual(null, _finishWindowTutorial);

            _retryWindowTutorial = GetComponentInChildren <_Tutorial.RetryWindow>();
            Assert.AreNotEqual(null, _retryWindowTutorial);

            _chooseCarTutorial = GetComponentInChildren <_Tutorial.ChooseCarTutorialWindow>();
            Assert.AreNotEqual(null, _chooseCarTutorial);

            _trigersTutorial = GetComponentInChildren <_Tutorial.TrigersTutorial>();
            Assert.AreNotEqual(null, _trigersTutorial);
        }