public void Menu() { //_gameWindow.ResetInfoWindowTime(); _audioService.StopGameMusic(); _statesManager.SwitchState(StatesEnum.MAIN_MULTIPLAYER_WINDOW); Core.Instance.StartCor( _gameManager.LoadGameScene("EntryPoint", () => { _uiManager.ShowWindow(UIWindowEnum.SPLASH, false); } )); }
// I_STATE public void Enable() { if (_core == null) { _core = Core.Instance; _networkManager = _core.GetService <NetworkManager>(); _statesManager = _core.GetService <StatesManager>(); _playerManager = _core.GetService <PlayerManager>(); _uiManager = _core.GetService <UIManager>(); _splashScreen = _uiManager.GetWindow(UIWindowEnum.SPLASH) as SplashScreen; } _core.GetService <UIManager>().ShowWindow(UIWindowEnum.SPLASH, true); _statesManager.SwitchState(StatesEnum.Auth); }
public void Finish() { IsEntryPointLoad = false; //Send stat switch (gameData.GameType) { // ----------------------------------------------------------------------------------------------- // case GameTypeEnum.MultyNew: SendSaveFirstRecord(); break; // ----------------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------------- // case GameTypeEnum.MultyNewFB: _networkManager.SaveFirstRecordForFB(gameData.gameId, Core.Instance.GetService <PlayerManager>().PlayerCar.model, () => { Core.Instance.GetService <StatesManager>().SwitchState(StatesEnum.MAIN_MULTIPLAYER_WINDOW); Core.Instance.StartCor( LoadGameScene("EntryPoint", () => { Core.Instance.GetService <UIManager>().ShowWindow(UIWindowEnum.SPLASH, false); } )); }, () => { Debug.LogError("Error send first FB statistics"); } ); break; // ----------------------------------------------------------------------------------------------- // case GameTypeEnum.MultyRecord: Debug.Log("MultyRecord"); SendSaveRecord(); break; // ----------------------------------------------------------------------------------------------- // case GameTypeEnum.MultyReplay: gameData.GameType = GameTypeEnum.MultyRecord; if (_handler != null) { _handler.Destroy(); } CreateGameHandler(); break; // ----------------------------------------------------------------------------------------------- // case GameTypeEnum.SingleNew: _handler.Destroy(); _statesManager.SwitchState(StatesEnum.MAIN_MULTIPLAYER_WINDOW); Core.Instance.StartCor( LoadGameScene("EntryPoint", () => { Core.Instance.GetService <UIManager>().ShowWindow(UIWindowEnum.SPLASH, false); } )); break; // ----------------------------------------------------------------------------------------------- } }