Make the score display a UIPage as well
This commit is contained in:
@@ -2,12 +2,14 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using Bootstrap;
|
||||
using Core;
|
||||
using UI;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
using UnityEngine.Playables;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
using UI.Core;
|
||||
|
||||
namespace Cinematics
|
||||
{
|
||||
@@ -25,7 +27,7 @@ namespace Cinematics
|
||||
private bool _isCinematicPlaying = false;
|
||||
public bool IsCinematicPlaying => _isCinematicPlaying;
|
||||
public GameObject cinematicBackground;
|
||||
public GameObject divingGameOverScreen;
|
||||
public DivingGameOverScreen divingGameOverScreen;
|
||||
|
||||
// Dictionary to track addressable handles by PlayableDirector
|
||||
private Dictionary<PlayableDirector, AsyncOperationHandle<PlayableAsset>> _addressableHandles
|
||||
@@ -204,7 +206,20 @@ namespace Cinematics
|
||||
|
||||
public void ShowGameOverScreen()
|
||||
{
|
||||
divingGameOverScreen.SetActive(true);
|
||||
if (divingGameOverScreen != null && UIPageController.Instance != null)
|
||||
{
|
||||
UIPageController.Instance.PushPage(divingGameOverScreen);
|
||||
}
|
||||
else if (divingGameOverScreen != null)
|
||||
{
|
||||
// Fallback if UIPageController is not available
|
||||
divingGameOverScreen.gameObject.SetActive(true);
|
||||
Logging.Warning("[CinematicsManager] UIPageController not found, falling back to simple activation.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Logging.Warning("[CinematicsManager] DivingGameOverScreen reference is not set!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user