Valentine Notes Dlivery game flow changes and improvements.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user