I have an object called Rock, this inherits from CCSprite.
I have added that as a child to a CCSpriteBatchNode, which is associated with a texture containing 2 sprites (boulder_1.png, and boulder_1_broken.png).
These were loaded in earlier as spriteframes from a plist file.
When the Rock object reaches half health, I want to be able to change the sprite.
I am trying to do this with this:
rock->initWithSpriteFrameName("boulder_1_broken.png");
as I did to setup the sprite but this throws an error when tried to draw.
Does anyone know another way I should be re-setting the image on the object?
Thanks in advance.