using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Playables; using UnityEngine.UI; // A behaviour that is attached to a playable public class ScriptPlayableTrackActivation : PlayableBehaviour { public StoryMgr mgr; public int masterId; public StoryLocation location = StoryLocation.Left; bool isPlayed = false; public void Init(int masterId, StoryLocation location, StoryMgr mgr) { this.mgr = mgr; this.masterId = masterId; this.location = location; } // Called when the owning graph starts playing public override void OnGraphStart(Playable playable) { } // Called when the owning graph stops playing public override void OnGraphStop(Playable playable) { //Debug.Log("OnGraphStop"); } // Called when the state of the playable is set to Play public override void OnBehaviourPlay(Playable playable, FrameData info) { isPlayed = true; if (mgr) { } else { } } public override void OnBehaviourPause(Playable playable, FrameData info) { //Debug.Log("pause"); if (isPlayed) { } } }