I am migrating from 0.8.2 to 0.9beta2.
I'm steadfastly working to have this new system work, but a scene which only contains a CCSprite and a CCSpriteSheet is crashing with "'If CCSprite is being rendered by CCSpriteSheet, CCSprite#draw SHOULD NOT be called'"
Now, I'm not sure what's going wrong with this. I have another project with 0.9 (which I started from scratch) and it works okay. I'm just not using the CCMenuItem options (as below). It looks like possibly the CCMenuItem is trying to call "draw" on the CCSprite? I know that I'm not adding regular sprites to the spriteSheet and vice versa, so I'm not sure why else it would be slagging as I'm not calling draw anywhere directly (as I should!).
Code is below, I thought of cleaning it up for readers, but I felt I might exclude some information.
CODE:
menuManager = [CCSpriteSheet spriteSheetWithFile:@"menu.png" capacity:12];
[self addChild:menuManager];
//START
CCSprite *item;
CCSprite *itemSel;
CCSprite *itemDis;
int block = 160;
int key = 0;
int opacity = 64;
//Play Button
item = [menuManager createSpriteWithRect:CGRectMake(0,key,320,32)];
itemSel = [menuManager createSpriteWithRect:CGRectMake(0,key+block,320,32)];
itemDis = [menuManager createSpriteWithRect:CGRectMake(0,key,320,32)];
itemDis.opacity = opacity;
[menuManager addChild:item];
[menuManager addChild:itemSel];
[menuManager addChild:itemDis];
CCMenuItemSprite *buttonPlay = [CCMenuItemSprite itemFromNormalSprite:item selectedSprite:itemSel disabledSprite:itemDis target:self selector:@selector(buttonPlayGame:)];
~ ... Declaring even more CCMenuItems ... ~
//Create Menu Itself
CCMenu *menu = [CCMenu menuWithItems:buttonResume,buttonPlay,buttonHighScores,buttonInstructions,buttonFiller,buttonAlsoBy,nil];
[menu alignItemsVertically];
menu.position = CGPointMake(menu.position.x, menu.position.y-115);
// IMPORTANT
// If you are going to use AtlasSprite as items, you should
// re-position the AtlasSpriteManager AFTER modifying the menu position
menuManager.position = menu.position;
[self addChild: menu];