1
Graphics / Is there a way to combine (add) sprites?
« on: November 15, 2015, 02:56:30 am »
Say, I have this sprite from a robot texture, BUT THE ROBOT IS ON FIRE!!!
And I want to draw a robot on fire.
Luckily I have a semi-transparent fire texture that I want to draw over the robot. I know I can just draw the robot sprite, and then draw the fire sprite over it. But that would require using two sprites.
To keep things simple, I made my robot class give out its own sprite (so it can handle its own movement animations and stuff), but it can only return a single sprite. And I would prefer that the robot class itself detected the robot is on fire and gave out a sprite with the robot on fire to be drawn.
Any way to achieve this (other than duplicating all my sprite sheets and adding a fire on the copies)?
And I want to draw a robot on fire.
Luckily I have a semi-transparent fire texture that I want to draw over the robot. I know I can just draw the robot sprite, and then draw the fire sprite over it. But that would require using two sprites.
To keep things simple, I made my robot class give out its own sprite (so it can handle its own movement animations and stuff), but it can only return a single sprite. And I would prefer that the robot class itself detected the robot is on fire and gave out a sprite with the robot on fire to be drawn.
Any way to achieve this (other than duplicating all my sprite sheets and adding a fire on the copies)?