/// <summary> /// Shows the game over screen. /// </summary> public void ShowGameOverScreen(int coins, int distance) { _gameoverScores.SetScores(coins, distance); _fadeToBlackImage.gameObject.SetActive(true); LeanTween.alpha(_fadeToBlackImage, 0.0f, 0.01f); LeanTween.alpha(_fadeToBlackImage, 1.0f, 0.6f).setEase(LeanTweenType.easeOutSine) .setOnComplete(() => { _gameOverScreen.gameObject.SetActive(true); if (eventResetGame != null) { eventResetGame(); } FadeOutBlack(); } ); _currentScreen = _gameOverScreen; }