Hook up the score display
This commit is contained in:
@@ -1,16 +1,29 @@
|
||||
using System;
|
||||
using Core;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using TMPro;
|
||||
using Minigames.DivingForPictures;
|
||||
|
||||
public class DivingGameOverScreen : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private TextMeshProUGUI finalScoreText;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (DivingGameManager.Instance != null)
|
||||
{
|
||||
int finalScore = DivingGameManager.Instance.PlayerScore;
|
||||
finalScoreText.text = $"{finalScore}";
|
||||
}
|
||||
}
|
||||
|
||||
public async void PlayAgain()
|
||||
{
|
||||
var progress = new Progress<float>(p => Logging.Debug($"Loading progress: {p * 100:F0}%"));
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace UI
|
||||
// Clear paused flag and broadcast event
|
||||
_isPaused = false;
|
||||
InputManager.Instance.SetInputMode(InputMode.GameAndUI);
|
||||
if(resetInput)
|
||||
if(resetInput)
|
||||
OnGameResumed?.Invoke();
|
||||
|
||||
Logging.Debug("[PauseMenu] Game Resumed");
|
||||
|
||||
Reference in New Issue
Block a user