コード例 #1
0
ファイル: XSeqence.cs プロジェクト: zxsean/seqence
        private void Build()
        {
            if (!graph.IsValid())
            {
                seqenceRoot = new GameObject("seqence");
                graph       = PlayableGraph.Create("SeqenceGraph");
            }
            var tracksData = config.tracks;
            int len        = tracksData.Length;

            trackTrees = new XTrack[len];
            for (int i = 0; i < len; i++)
            {
                trackTrees[i] = XSeqenceFactory.GetTrack(tracksData[i], this);
                if (i >= 0 && i == config.skillHostTrack)
                {
                    SkillHostTrack = trackTrees[i];
                }
            }
            prev = 0;
            if (graph.IsValid())
            {
                if (Application.isPlaying)
                {
                    graph.SetTimeUpdateMode(DirectorUpdateMode.GameTime);
                    graph.Play();
                    editMode = SeqencePlayMode.RealRunning;
                }
            }
            _duration = RecalcuteDuration();
        }
コード例 #2
0
ファイル: XTrack.cs プロジェクト: zxsean/seqence
 public void Initial(TrackData data, XSeqence tl, XTrack parent)
 {
     this.data    = data;
     this.seqence = tl;
     this.parent  = parent;
     if (data != null)
     {
         if (data.clips != null)
         {
             int len = data.clips.Length;
             clips = new IClip[len];
             for (int i = 0; i < len; i++)
             {
                 clips[i] = BuildClip(data.clips[i]);
             }
         }
         if (data.marks != null)
         {
             int len = data.marks.Length;
             marks = new XMarker[len];
             for (int i = 0; i < len; i++)
             {
                 marks[i] = XSeqenceFactory.GetMarker(this, data.marks[i]);
             }
         }
         if (data.childs != null)
         {
             int len = data.childs.Length;
             childs = new XTrack[len];
             for (int i = 0; i < len; i++)
             {
                 childs[i] = XSeqenceFactory.GetTrack(data.childs[i], seqence, this);
             }
         }
     }
     OnPostBuild();
 }
コード例 #3
0
 public override XTrack Clone()
 {
     return(XSeqenceFactory.GetTrack(data, seqence, parent));
 }
コード例 #4
0
ファイル: XLogicTrack.cs プロジェクト: zxsean/seqence
        public override XTrack Clone()
        {
            TrackData data = CloneData();

            return(XSeqenceFactory.GetTrack(data, seqence, parent));
        }