Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 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();
 }
Ejemplo n.º 3
0
 public override XTrack Clone()
 {
     return(XSeqenceFactory.GetTrack(data, seqence, parent));
 }
Ejemplo n.º 4
0
        public override XTrack Clone()
        {
            TrackData data = CloneData();

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