swiftsprite-kitsktexture

Is there a way to update textures in SpriteKit besides Manually changing them?


Changing a SKNodes SKTexture by

Node.texture = SKTexture(imagenamed: MyTexture)

isn't working, is there another way?


Solution

  • I use this way:

    let changeTexture = SKAction.animateWithTextures([page1], timePerFrame: 0.1)
    bg.runAction(changeTexture)