Exemple #1
0
 public SingleSequenceBehaviour()
 {
     Behaviours          = new LinkedList <SingleBehaviourTimeCallback>();
     OnCompletedCallback = null;
     Current             = null;
     MaxDuration         = 0;
     TimeElappsed        = 0;
 }
Exemple #2
0
 public void ConsumeChild()
 {
     if (Current == null && Behaviours.Count > 0)
     {
         Current = Behaviours.ElementAt(0);
         Behaviours.RemoveFirst();
         TimeElappsed = Current.StartTime;
     }
 }
Exemple #3
0
 public void Append(SingleBehaviourTimeCallback callback, float duration, bool playImmediate = false)
 {
     // 以当前最大结束时间作为开始时间点
     callback.SetStartTime(MaxDuration, duration);
     callback.Single = this;
     Behaviours.AddLast(callback);
     MaxDuration += duration;
     if (playImmediate)
     {
         ConsumeChild();
     }
 }
Exemple #4
0
 public void Stop()
 {
     Current = null;
     Behaviours.Clear();
 }
Exemple #5
0
 public void Next()
 {
     Current = null;
     ConsumeChild();
 }