I’ve finally got my sprites in plists and packed textures and am wondering why after setting up the cache and batch node:
SpriteFrameCache::getInstance()->addSpriteFramesWithFile(“HelloScene.plist”);
SpriteBatchNode *helloBatchNode = SpriteBatchNode::create(“HelloScene.png”);
this->addChild(helloBatchNode);
and
helloBatchNode->addChild(Sprite1);
helloBatchNode->addChild(Sprite2);
…
helloBatchNode->addChild(SpriteN);
Only one sprite (two actually, as it is a toggle) is ever drawn to the screen at any time?
Sprite::createWithSpriteFrameName(
raises exception if the frame doesn’t exist so I believe they all get loaded.
I assume batch node is meant to only output one sprite? Such a overhead for one limb/sprite (1024x1024)!
Strangely enough, this was all my fault, again. I mistakedly setPosition
on the SpriteBatchNode
when it was intended for one of its children. Please delete.