I have the following code:
func laser() {
let scene: SKScene = SKScene(fileNamed: "Laser")!
let laser = scene.childNode(withName: "laser")
let waitAction: SKAction = SKAction.wait(forDuration: 0.0001)
let removeAction: SKAction = SKAction.removeFromParent()
laser?.run(SKAction.sequence([waitAction,removeAction]))
}
But it seems like the nodes are not been remove from memory because keep increasing. Any if you knows why either SKAction.wait or SKAction.removeFromParent() is not been executed?
I'll really appreciate your help.