Tag: 雪碧

如何在中途在SKAction中反转path的方向?

我有一个SKSpriteNode沿着使用SKAction的圆形path移动: // create the path our sprite will travel along let circlePath = CGPathCreateWithEllipseInRect(CGRect(origin: pathCenterPoint, size: CGSize(width: circleDiameter, height: circleDiameter)), nil) // create a followPath action for our sprite let followCirclePath = SKAction.followPath(circlePath, asOffset: false, orientToPath: false, duration: 2 我可以添加.ReversedAction()来反转精灵的方向,但是这只会从起点开始。 当它在path上的某个点时,我如何反转精灵的方向?