void OnGameLoseEvent(GameLoseEvent eve) { IsPlaying = false; AircraftObject.Explode(); // submit score // TODO: USe GPManager Social.ReportScore((long)TotalScore, GPGSids.leaderboard_high_scores, (bool success) => { // handle success/failure }); // submit coins GameSaveManager.Instance.AddCoins((int)TotalScore); GameSaveManager.Instance.SetFirstPlay(false); }
void Lose() { CloseGame(); var state = CurrentGame.Levels[currentLevel].Status; if (state != StatusLevel.CLOSE) { SetStatusCurrentLevel(StatusLevel.OPEN); } SetState(GameState.MENU); GameLoseEvent?.Invoke(); //событие проигрыша AudioManager.Instance.Play(StaticPrm.SOUND_LOSS_GAME); }
private void Awake() { // initialize events: if (GameWinEvent == null) { GameWinEvent = new GameWinEvent(); } if (GameLoseEvent == null) { GameLoseEvent = new GameLoseEvent(); } if (PauseEvent == null) { PauseEvent = new PauseEvent(); } if (UnPauseEvent == null) { UnPauseEvent = new UnPauseEvent(); } if (BoostEvent == null) { BoostEvent = new BoostEvent(); } if (ShieldEvent == null) { ShieldEvent = new ShieldEvent(); } if (KnockedOffCarEvent == null) { KnockedOffCarEvent = new KnockedOffCarEvent(); } if (DeterminedClosestCarEvent == null) { DeterminedClosestCarEvent = new DeterminedClosestCarEvent(); } }
private void OnGameLoseEvent(GameLoseEvent eve) { StartCoroutine(IEGameLoseEvent()); }
void OnGameLoseEvent(GameLoseEvent eve) { StartCoroutine(IEGameOver()); }