WIP 2
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user