Hook up the score display

This commit is contained in:
Michal Pikulski
2025-10-16 23:59:25 +02:00
parent b2384269e5
commit 3fc43fa92d
5 changed files with 33 additions and 19 deletions

View File

@@ -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}%"));

View File

@@ -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");