public override Playable CreatePlayable(PlayableGraph graph, GameObject owner) { var playable = ScriptPlayable <LoopBehaviour> .Create(graph); LoopBehaviour beheviour = playable.GetBehaviour(); beheviour.director = owner.GetComponent <PlayableDirector> (); beheviour.waitTimeline = owner.GetComponent <WaitTimeline> (); return(playable); }
public override Playable CreatePlayable(PlayableGraph graph, GameObject owner) { // 情報の取得 ScriptPlayable <LoopBehaviour> playable = ScriptPlayable <LoopBehaviour> .Create(graph); LoopBehaviour behaviour = playable.GetBehaviour(); // 情報の設定 behaviour.Director = owner.GetComponent <PlayableDirector>(); behaviour.WaitLoopTrigger = FindObjectOfType <WaitLoopTrigger>(); return(playable); }
public void Remove(LoopBehaviour behaviour) { int idx = _toAdd.IndexOf(behaviour); if (idx != -1) { _toAdd.RemoveAt(idx); } else { _toRemove.Add(behaviour); } }
// Factory method that generates a playable based on this asset // クリップの作成 public override Playable CreatePlayable(PlayableGraph graph, GameObject go) { // ビヘイビアの作成 LoopBehaviour behaviour = new LoopBehaviour(); // GameObjectを取り出す var directorObj = director.Resolve(graph.GetResolver()); // ビヘイビアの変数に参照を渡す behaviour.Director = directorObj; // リターンするためのプレイアブルの作成 ScriptPlayable <LoopBehaviour> playable = ScriptPlayable <LoopBehaviour> .Create(graph, behaviour); return(playable); }
public void AddToLast(LoopBehaviour behaviour) { _toAdd.Add(behaviour); }
private int GetIndex(LoopBehaviour behaviour) { return(_items.BinarySearch(behaviour, _comparer)); }