开发者

Console Error with CCParallaxNode and crash

I'm getting an error in the console that reads Assertion failure in -[CCParallaxNode addChild:z:tag:] This is for the code

    CGSize winSize = [[CCDirector sharedDirector] winSize];
    node = info;
    voidNode = [CCParall开发者_开发技巧axNode node];
    [voidNode addChild:node z:2 parallaxRatio:ccp(0.0f, 1.0f) positionOffset:ccp(info.contentSize.width/2, info.contentSize.height/2 - winSize.height)];
    [self addChild:voidNode z:2 tag:kTagNode];

Not very familiar with debugging with the console


Why don't you simply put there a breakpoint and see what is happening ? Every time i had such error the problem was trying to add a nil child to the parent (there is an assertation of it in a addChild method

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜