我正在尝试将SKEmitterNode位置转换为视图,但我不知道如何。我曾尝试使用该代码从Apple转换SKSpriteNode,但它不起作用。这是我的原始代码,它不起作用:
override func touchesMoved(touches: Set<UITouch>, withEvent: UIEvent?) {
let traces: [SKEmitterNode]? = self.trace!.children as? [SKEmitterNode]
if (traces != nil && traces?.isEmpty != nil) {
for trace in traces! {
trace.particlePosition = (touches.first?.locationInView(trace))!
}