children_
( )的计数CCArray
输出 15,我收到错误:
'NSInternalInconsistencyException', reason: 'index out of range in objectAtIndex(14), index 15'
for (NSInteger i=[children_ count]-1; i>=0; i++) {
CCNode *c = [children_ objectAtIndex:i];
if ([c isKindOfClass:[CCLabelTTF class]]) {
[c removeFromParentAndCleanup:YES];
}
}
我将如何解决这个问题?尝试删除所有标签以更改其字符串值。在我的 CCLayer 上,我还有一些 CCMenuItemLabel 和 CCMenuItemLabelAndSprite...