Hello Guest

Author Topic: Changing color of many sprites?  (Read 3103 times)

JReanne

  • Newbie
  • *
  • Posts: 8
    • View Profile
Changing color of many sprites?
« on: March 03, 2014, 09:57:13 pm »
Hello,
I would like to be able to change the color of many sprites at once at runtime without needing to go into each individual sprite.  Normally I would do this by setting each object to the same material and modifying the material's color, but I'm not sure what the equivalent would be with 2D Toolkit.  Any help would be appreciated!

Thank you,
Jenna

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Changing color of many sprites?
« Reply #1 on: March 03, 2014, 11:46:58 pm »
You will need to use a shader that has a colour parameter. tk2d uses vertex colours instead of colours to be  able to individually tint multiple sprites, but you can use any shader with tk2d, including ones that have the colour parameter.