Exemple #1
0
 public override void Update()
 {
     Transform.position = Vector3.MoveTowards(Transform.position, target, speed * Time.deltaTime);
     if (Transform.position == target)
     {
         destroy = true;
         Callback.ActionDone(this);
     }
 }
 public override void Update()
 {
     Transform.position = Vector3.MoveTowards(Transform.position, des, speed * Time.deltaTime);
     if (Transform.position == des)
     {
         destroy = true;
         //according to whether is catching, different action response
         Callback.ActionDone(this, isCatching);
     }
 }
 public void ActionDone(SSAction source, bool catchState = false)
 {
     source.destroy = false;
     start++;
     if (start >= sequence.Count)
     {
         start = 0;
         if (repeat > 0)
         {
             repeat--;
         }
         if (repeat == 0)
         {
             destroy = true;
             Callback.ActionDone(this);
         }
     }
 }
Exemple #4
0
 public void ActionDone(SSAction source)
 {
     source.destroy = false;
     currentActionIndex++;
     if (currentActionIndex >= sequence.Count)
     {
         currentActionIndex = 0;
         if (repeat > 0)
         {
             repeat--;
         }
         if (repeat == 0)
         {
             destroy = true;
             Callback.ActionDone(this);
         }
     }
 }