我最后说:
我在<代码>CC Director中添加了“draw”等级:
-(void) printChildren:(CCNode *)node andLevel:(NSInteger)level {
NSString *tabs = @"";
for (int i=0; i <level; i++) {
tabs = [NSString stringWithFormat:@"%@ ", tabs];
}
NSLog(@"%@NODE %@. Children count: %d", tabs, node, node.children.count);
if ( node.children.count == 0 ) {
return;
} else {
for (CCNode *child in node.children) {
[self printChildren:child andLevel:level+1];
}
}
}
-(void) nodeHierarchy
{
NSLog(@"Printing nodeHierarchy! with an stack of %d scenes", [scenesStack_ count]);
for (CCScene *scene in scenesStack_) {
NSLog(@"Scene in stack: %@", [scene class]);
[self printChildren:scene andLevel:0];
}
}
见nodeHierarchy
,载于replaceScene
。
更有视觉工具是巨大的,但这对我有利。