コード例 #1
0
 public void SSActionEvent(SSAction source)
 {
     source.destroy = false;
     this.currentActionIndex++;
     if (this.currentActionIndex >= sequence.Count)
     {
         this.currentActionIndex = 0;
         if (repeat > 0)
         {
             repeat--;
         }
         if (repeat == 0)
         {
             this.destroy = true;
             this.whoToNotify.SSActionEvent(this);
         }
     }
 }
コード例 #2
0
        public void moveCharacter(MyCharacterController characterCtrl, Vector3 destination)
        {
            Vector3 currentPos = characterCtrl.getPos();
            Vector3 middlePos  = currentPos;

            if (destination.y > currentPos.y)                           //from low(boat) to high(coast)
            {
                middlePos.y = destination.y;
            }
            else                        //from high(coast) to low(boat)
            {
                middlePos.x = destination.x;
            }
            SSAction action1   = CCMoveToAction.getSSAction(middlePos, characterCtrl.movingSpeed);
            SSAction action2   = CCMoveToAction.getSSAction(destination, characterCtrl.movingSpeed);
            SSAction seqAction = CCSequenceAction.getSSAction(1, 0, new List <SSAction> {
                action1, action2
            });

            this.addAction(characterCtrl.getGameobj(), seqAction, this);
        }
コード例 #3
0
ファイル: BaseCode.cs プロジェクト: iamcaiji/unity3D
 public void OnActionCompleted(SSAction action)
 {
     SSActionManager.GetInstance().ApplyCCMoveToAction(obj, target, speed, null);
 }
コード例 #4
0
 public void SSActionEvent(SSAction source)
 {
 }
コード例 #5
0
 public void SSActionEvent(SSAction sourse, SSActionEventType events = SSActionEventType.Completed)
 {
     Debug.Log("Completed!");
 }