using System; using Core; using UnityEngine; 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(p => Logging.Debug($"Loading progress: {p * 100:F0}%")); await SceneManagerService.Instance.ReloadCurrentScene(progress);; gameObject.SetActive(false); } }