All,
Before Apple released Swift 2 and Xcode 7 I was using the following Swift code to display Particles. It worked like a charm. Then the updates to Swift 2 and the particles just will not render and display. Here is the code does anyone know how I can fix it?
let sparkEmitter = SKEmitterNode(fileNamed: "zombie_slice.sks")
sparkEmitter!.name = "sparkEmitter"
sparkEmitter!.zPosition = 1
sparkEmitter!.targetNode = self
sparkEmitter!.particleLifetime = 1
sparkEmitter!.position.x = self.player.position.x
sparkEmitter!.position.y = self.player.position.y
self.addChild(sparkEmitter!)
let actionDone = SKAction.runBlock({self.zombieDeathSequenceEnded(node as! SKSpriteNode, zombieNumber: zombieToUseForDeathSequence as Int, theEmitter: sparkEmitter!)})
node.runAction(SKAction.sequence([zombie_death_anim, actionDone]))