using System; using Core; using UnityEngine; using TMPro; using Minigames.DivingForPictures; public class DivingGameOverScreen : MonoBehaviour { [SerializeField] private TextMeshProUGUI finalScoreText; 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); } /// /// Exits to the main menu scene. /// public async void ExitToAppleHills() { gameObject.SetActive(false); // Replace with the actual scene name as set in Build Settings var progress = new Progress(p => Logging.Debug($"Loading progress: {p * 100:F0}%")); await SceneManagerService.Instance.SwitchSceneAsync("AppleHillsOverworld", progress); } /// /// Exits to the main menu scene. /// public async void ExitToQuarry() { gameObject.SetActive(false); // Replace with the actual scene name as set in Build Settings var progress = new Progress(p => Logging.Debug($"Loading progress: {p * 100:F0}%")); await SceneManagerService.Instance.SwitchSceneAsync("Quarry", progress); } }