Hey,
I am beginning to think that my CCLayer is not in a Hierarchy.
Here is some code and some reasons why:
@interface CCMyGame : CCLayer {
CCDirector* director = [CCDirector sharedDirector];
[CCDirector setDirectorType:kCCDirectorTypeDisplayLink];
[director setAnimationInterval:1.0/60];
[director setOpenGLView:self.eaglView];
[director setDisplayFPS:YES];
[director runWithScene:[CCSceneGame scene]];
I see one CCSprite of mine but thats it, I do not see anything else.
Then in my CCLayer class I do this to fully activate a CCScene:
+(CCScene *) scene
{
CCScene *scene = [CCScene node];
CCSceneGame *layer = [CCSceneGame node];
[scene addChild:layer];
return scene;
}
This is how I add my CCScene. Is this correct, is there anything I am doing wrong here?
Anyway,
Here are some reasons why I am beginning to think that my CCLayer is messed up (not added or something similar)
1. [self schedule:@selector(myMethod)]; Does nothing, it does not call myMethod and this is confirmed with NSLogs
I also looked at this link: http://www.cocos2d-iphone.org/forum/topic/13988 and that is why I am beginning to think that my CCLayer or CCScene is messed up!
2. None but one of my CCSprites are showing. I have a few CCSprites that I add like [self addChild:mySprite]; But I do not see them. They are all attached to b2Bodys and some are animating but I only see one CCSprite and I am not sure why that is the only one I see.
I confirmed that these sprites are on the view by NSLogging the other sprites coordinates but I just do not see them.
Does anyone have any idea why this might be happening?
Thanks!