예제 #1
0
        public static CCBoatMove GetSSAction(Vector3 target)
        {
            CCBoatMove action = ScriptableObject.CreateInstance <CCBoatMove>();

            action.target = target;
            return(action);
        }
예제 #2
0
 public void moveBoat(GameObject boat, int to_or_from)
 {
     if (to_or_from == -1)
     {
         Debug.Log("船应该向右移");
         CCBoatMove boatMoveToRight = CCBoatMove.GetSSAction(new Vector3(5, 1, 0));
         this.RunAction(boat, boatMoveToRight, this);
     }
     else
     {
         Debug.Log("船应该向左移");
         CCBoatMove boatMoveToLeft = CCBoatMove.GetSSAction(new Vector3(-5, 1, 0));
         this.RunAction(boat, boatMoveToLeft, this);
     }
 }