I have to classes, Survival and HUDLayer.
In my HUDLayer I have a SneakyButton and with that button I call a method in the Survival.m called -(void)fire but when I call the method I get the error message CCSpriteBatchNode: resizing TextureAtlas capacity from
and I know the method is being called since I check that with a NSLog()
-(void)fire {
NSLog(@"Fire");
}
And in my log it returns Fire as well as that weird warning.
When I get the warning, fps drop to around 30. Anyone got any suggestions?
This is what you can find inside cocos2d sources about resizing texture atlas:
This is the explication of what is happening:
Child nodes also count toward reaching the limit of capacity of the sprite.
You can try and set a higher limit for your batch node:
to reduce the frequency of this happening.