I'm currently using the 2DToolkit for all my character animations and sprites, but I have created an "explosion" system which causes the characters to break into their individual pixels upon certain game over states. To make it more dynamic I want to be able to iterate through each pixel of a sprite and find its colour, mapping it to the individual "pixel" that will then explode. This way, with a bit of smoke and mirrors in hiding the actual sprite, it looks like the actual character sprite is exploding apart.
My current thinking is that the best way to do this is to simply ready directly from the sprite / atlas in some way, but I'm not sure the best way to go about it. I was looking through the documentation but I got a bit muddled, so I was hoping someone might be able to point me in the right direction.
I know directly reading is probably not the most efficient way of doing things, but the character atlases are only 128*128 (256*256 in some cases) and each individual sprite is only about 30*80 so it seems like a better way of doing it than trying to manually build "pixels" for every possible sprite each character has.
So, basically - A dynamic way of getting the colours for the current sprite for the current character from the atlas, so I can apply those same colours to an explosion system!
Thanks.