public void MovePriest(Priest priest) { Vector3 destination = priest.getDestination(); GameObject gameObject = priest.priest; Vector3 startPos = gameObject.transform.position; Vector3 middlePos = destination; if (startPos.y > destination.y) { middlePos.y = startPos.y; } else { middlePos.x = startPos.x; } SSAction action1 = CCMoveToAction.GetSSAction(gameObject, middlePos, AnimateSpeed, null); SSAction action2 = CCMoveToAction.GetSSAction(gameObject, destination, AnimateSpeed, null); CCSequenceAction action = CCSequenceAction.GetSSAction(1, 0, new List <SSAction> { action1, action2 }, this); addAction(action); }