Exemple #1
0
 private void DoDeath()
 {
     Debug.Log("StopExplosion");
     GameOverExplosive.StopExplosion();
     if (TrainController.Instance.Lives == 0)
     {
         OnGameOver();
     }
     else
     {
         Restart();
     }
 }
Exemple #2
0
        public void OnDeath()
        {
            GameOverExplosive.Explode();
            var livesRemaining = --TrainController.Instance.Lives;

            if (livesRemaining == 0)
            {
                Invoke(nameof(DoDeath), 5f);
            }
            else
            {
                Invoke(nameof(DoDeath), 2f);
            }
            sfxManager.TunnelBump.PlayRandomPitch();
        }