当尝试产生一个节点时,“尝试添加一个已经有父节点的SKNode”错误

我一直得到的错误是这样的: Attemped to add a SKNode which already has a parent 。 我已经试图取出产卵function,它没有它的作品。 有人可以帮帮我吗 ?

 func spawnTrolls(){ let minValue = self.size.width / 10 let maxValue = self.size.width - 30 let spawnpoint = UInt32(maxValue - minValue) Troll.position = CGPointMake(CGFloat(arc4random_uniform(spawnpoint)), self.size.height) self.addChild(Troll) let action = SKAction.moveToY(-70, duration: 2) let actionDone = SKAction.removeFromParent() Troll.runAction(SKAction.sequence([action, actionDone])) Troll.physicsBody? = SKPhysicsBody(rectangleOfSize: Troll.size) Troll.physicsBody?.categoryBitMask = physicsCategory.Troll Troll.physicsBody?.contactTestBitMask = physicsCategory.Rocket Troll.physicsBody?.affectedByGravity = false Troll.physicsBody?.dynamic = true } _ = NSTimer.scheduledTimerWithTimeInterval(0.5, target: self, selector: Selector("spawnTrolls"), userInfo: nil, repeats: true)