private void Init_Gameplay_Singleplayer() { _gameWindowSingleplayer = GetComponentInChildren <_Single.GameWindowSingleplayer>(); Assert.AreNotEqual(null, _gameWindowSingleplayer); // _pauseWindowSingle = GetComponentInChildren <_Single.PauseWindow>(); Assert.AreNotEqual(null, _pauseWindowSingle); _finishWindowSingle = GetComponentInChildren <_Single.FinishWindow>(); Assert.AreNotEqual(null, _finishWindowSingle); _retryWindowSingle = GetComponentInChildren <_Single.RetryWindow>(); Assert.AreNotEqual(null, _retryWindowSingle); }
// I_HANDLER #region I_HANDLER_INTERFACES public void Init(GameData data) { Debug.Log("INIT >>> SINGLE HANDLER"); //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_SINGLE) as GameWindowSingleplayer; Assert.AreNotEqual(null, _gameWindow); _pauseWindow = _uiManager.GetWindow(UIWindowEnum.PAUSE_SINGLE) as PauseWindow; Assert.AreNotEqual(null, _pauseWindow); _retryWindow = _uiManager.GetWindow(UIWindowEnum.RETRY_SINGLE) as RetryWindow; Assert.AreNotEqual(null, _retryWindow); _finishWindow = _uiManager.GetWindow(UIWindowEnum.FINISH_SINGLE) as FinishWindow; Assert.AreNotEqual(null, _finishWindow); // _gameData = data; _gameManager.LoadTrack(OnTrackLoaded); }