Made intro timeline, added it to cementfactory

This commit is contained in:
journaliciouz
2025-12-14 17:02:37 +01:00
parent a0a316dbbd
commit b3efb02c2c
17 changed files with 2580 additions and 578 deletions

View File

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