So I am having an issue with one of my SKEmitterNodes. I have an SKSpriteNode that when touched opens a new scene. Here is the code in touches began:
for touch: AnyObject in touches {
let location = (touch as! UITouch).location(in: self)
if let nodeName = self.atPoint(location).name {
if nodeName == "playBox" || nodeName == "playButton" {
buttonSound()
pulse(playBox, scene: "GameScene")
}else if nodeName == "shopBox" || nodeName == "shopButton"{
buttonSound()
pulse(shopBox, scene: "shop")
}}}
At this point, everything works great. My issue occurs when I add my SKEmitterNode to the scene. The emitter is a starfield effect, so little dots are going from the top of the scene to the bottom. Once I add this emitter, my button stops working!
I have tried everything lowering the spawn rate, lowering the zPosition, but nothing seems to work.
Please let me know if you have any advice. Thanks!
-Matt