Пример #1
0
    private void OnGameOver()
    {
        Debug.Log("Game Over!");
        UpdateTrainAtEnd();

        bgMusic.Stop();
        sfxCrowdShock.Play();

        isGameOver = true;

        if (scoreHandler != null)  // This is null in the main menu
        {
            scoreHandler.FreezeTimer();
            scoreHandler.AddSimulatorPoints(blockMapVisualizer.Simulator);
            trainAnimator.SetBool("IsExploded", true);
        }

        HandleHighscore();
    }