Is it possible to update/change the image of an SKSpriteNode
?
The code below does not work:
var boss1 = SKSpriteNode(imageNamed: "boss1.png")
boss1 = SKSpriteNode(imageNamed: "boss2.png")
Once you created the SKSpriteNode
var boss1 = SKSpriteNode(imageNamed: "boss1.png")
you can update the texture
property like that
boss1.texture = SKTexture(imageNamed: "boss2.png")
Here's an example from my Playground