最佳答案
尝试留下原始 Sprite 的 x 个副本,但启动 SKAction 将 alpha 淡化为 0,并可能将大小也缩放为 0。创建一个 NSTimer 以在一两秒后删除旧的 Sprite 。将这段代码放在你移动你想要尾部的主要 Sprite 的地方
//copy the sprite that is moving around
let newSprite = theMovingNode.copy()
//fade and shrink our new sprite
newSprite.runAction(SKAction.FadeAlphaTo(0,duration:2.0))
newSprite.runAction(SKAction.ScaleTo(0,duration:2.0))
// create a timer to remove this sprite in 2 seconds
let timer = NSTimer.scheduledTimerWithTimeInterval(2, target: self, selector: Selector("removeTailSprite:"), userInfo: newSprite, repeats: false)
关于ios - Spritekit 运动轨迹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33271958/