Yo,
I’m having a problem in coco2d to do with layers. I have a background, using this code:
CCSprite * background = [CCSprite spriteWithFile:@"background_menu.png"];
[self addChild:background];
background.position = ccp(240,160);
It is basically just a sprite, with a position that I have assigned to it. Then, I have a menu, made using CCMenu, with four CCMenuItemImage. When I run the program, the background blocks out the menu, so all I can see is the background. I was wondering how to make it so that the menu appears on top of the background. I know this has something to do with layers, but I am a bit confused about how to make layers and how to create a hierarchy with them, so that some appear on top of others.
Probably the z order. Try:
or add the menu with a higher z order