Hello! I'm using Mac SDK 2.5.0.
When an enemy is taking damage, I'd like to flash its sprite to all white and/or black while retaining its clear (transparent) background color.
I realize I could do this via an imagetable and literally create these two extra all white/black images and switch between them, but shouldn't I be able to use setImageDrawMode() to do this? I imagine this would be more performant, it certainly would be more convenient.
That said, after I've declared, asserted, and defined the sprite with its image object, I'm unclear how or if I'm able to redraw it in a different mode. My attempts to simply declare gfx.setImageDrawMode(gfx.kDrawModeFillWhite) in the sprite's :update loop do nothing, as does calling self:markDirty() either before or after that statement.
Even calling gfx.setImageDrawMode(gfx.kDrawModeFillWhite) before the declaration, assertion, and sprite definition of the image object has no effect.
I'm unclear from the documentation how to properly use this feature, nor can I find any examples or threads explaining it. Any help would be greatly appreciated, I'm stumped and just considering the manual imagetable route.