Valentine Notes Dlivery game flow changes and improvements.

This commit is contained in:
Michal Pikulski
2025-12-17 00:55:47 +01:00
parent 6133caec53
commit c6d2ca4e5c
11 changed files with 1095 additions and 412 deletions

View File

@@ -1,41 +1,42 @@
using UnityEngine;
using Core;
using Core.Lifecycle;
using UnityEngine.Playables;
using Input;
using Unity.Cinemachine;
using UnityEngine;
using UnityEngine.Playables;
public class LevelIntroDirector : ManagedBehaviour
namespace Cinematics
{
public bool playOnSceneReady;
[HideInInspector]
public PlayableDirector introPlayableDirector;
internal override void OnSceneReady()
public class LevelIntroDirector : ManagedBehaviour
{
base.OnSceneReady();
if (playOnSceneReady)
public bool playOnSceneReady;
[HideInInspector]
public PlayableDirector introPlayableDirector;
internal override void OnSceneReady()
{
introPlayableDirector = GetComponent<PlayableDirector>();
introPlayableDirector.stopped += IntroTimelineStopped;
PlayIntroTimeline();
base.OnSceneReady();
if (playOnSceneReady)
{
introPlayableDirector = GetComponent<PlayableDirector>();
introPlayableDirector.stopped += IntroTimelineStopped;
PlayIntroTimeline();
}
else { gameObject.SetActive(false); }
}
else { gameObject.SetActive(false); }
}
private void IntroTimelineStopped(PlayableDirector director)
{
InputManager.Instance.SetInputMode(InputMode.Game);
introPlayableDirector.stopped -= IntroTimelineStopped;
gameObject.SetActive(false);
private void IntroTimelineStopped(PlayableDirector director)
{
InputManager.Instance.SetInputMode(InputMode.Game);
introPlayableDirector.stopped -= IntroTimelineStopped;
gameObject.SetActive(false);
}
}
public void PlayIntroTimeline()
{
introPlayableDirector.Play();
InputManager.Instance.SetInputMode(InputMode.InputDisabled);
}
public void PlayIntroTimeline()
{
introPlayableDirector.Play();
InputManager.Instance.SetInputMode(InputMode.InputDisabled);
}
}
}