Esempio n. 1
0
    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);
    }
Esempio n. 2
0
    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);
    }
Esempio n. 3
0
        public void Remove(LoopBehaviour behaviour)
        {
            int idx = _toAdd.IndexOf(behaviour);

            if (idx != -1)
            {
                _toAdd.RemoveAt(idx);
            }
            else
            {
                _toRemove.Add(behaviour);
            }
        }
Esempio n. 4
0
    // 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);
    }
Esempio n. 5
0
 public void AddToLast(LoopBehaviour behaviour)
 {
     _toAdd.Add(behaviour);
 }
Esempio n. 6
0
 private int GetIndex(LoopBehaviour behaviour)
 {
     return(_items.BinarySearch(behaviour, _comparer));
 }