This commit is contained in:
journaliciouz
2025-10-16 22:45:13 +02:00
parent 4fc005b082
commit 09ae4b5ba7
4 changed files with 120 additions and 29 deletions

View File

@@ -23,6 +23,8 @@ namespace Cinematics
private Image _cinematicSprites;
private bool _isCinematicPlaying = false;
public bool IsCinematicPlaying => _isCinematicPlaying;
public GameObject cinematicBackground;
public GameObject divingGameOverScreen;
// Dictionary to track addressable handles by PlayableDirector
private Dictionary<PlayableDirector, AsyncOperationHandle<PlayableAsset>> _addressableHandles
@@ -132,6 +134,7 @@ namespace Cinematics
OnCinematicStopped?.Invoke();
// Release the addressable handle associated with this director
ReleaseAddressableHandle(director);
ShowCinematicBackground(false);
}
/// <summary>
@@ -190,5 +193,15 @@ namespace Cinematics
}
_addressableHandles.Clear();
}
public void ShowCinematicBackground(bool shouldBeActive)
{
cinematicBackground.SetActive(shouldBeActive);
}
public void ShowGameOverScreen()
{
divingGameOverScreen.SetActive(true);
}
}
}