コード例 #1
0
ファイル: ActionController.cs プロジェクト: ZhaoJle/3dgame
 public override void Update()
 {
     Transform.position = Vector3.MoveTowards(Transform.position, target, speed * Time.deltaTime);
     if (Transform.position == target)
     {
         destroy = true;
         Callback.ActionDone(this);
     }
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
 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);
         }
     }
 }
コード例 #4
0
ファイル: ActionController.cs プロジェクト: ZhaoJle/3dgame
 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);
         }
     }
 }