0

In my game, i have a wizard sprite.

wizard

I would like to be able to change the colour of this sprite programatically so put a faded color over the top to change the color.

So when the player changes the character, the sprite color changes.

Any ideas on how to do this?

Ron Myschuk
  • 6,011
  • 2
  • 20
  • 32
Luke Roberts
  • 311
  • 1
  • 4
  • 15

1 Answers1

3

I would just convert the colorable portion to greyscale and use SKAction.colorize the sprite.

this works very well, I use it all the time, however you may have to create a wizard overlay of the red and yellow parts so they don't get colorized as well

white wizard

Ron Myschuk
  • 6,011
  • 2
  • 20
  • 32