Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func spawnBullet() {
- let bullet = SKShapeNode(circleOfRadius:30)
- //set other properties here...
- self.addChild(bullet)
- }
- var bulletNode: SKShapeNode?
- func setBulletProperty() {
- let bullet:SKShapeNode? = SKShapeNode(circleOfRadius: 30)
- //set other properties here...
- bulletNode = bullet
- }
- func spawnBullet() {
- let newBullet = bulletNode.copy() as! SKShapeNode
- self.addChild(newBullet)
- }
Add Comment
Please, Sign In to add comment