Iphone 带spritebatchnode的边界框

Iphone 带spritebatchnode的边界框,iphone,ios,objective-c,cocos2d-iphone,Iphone,Ios,Objective C,Cocos2d Iphone,创建精灵批处理节点时,边界框为空。如何获取精灵批处理节点的边界框或矩形,以便使用它进行碰撞。精灵批处理边界框始终为空。但也可以使用精灵批处理子对象的边界框来检查碰撞 CCArray* children = _gameBatch.children; NSUInteger childrenCount = children.count; CCSprite* child; for (NSUInteger pos = 0; pos < childrenCount; pos++) { chil

创建精灵批处理节点时,边界框为空。如何获取精灵批处理节点的边界框或矩形,以便使用它进行碰撞。

精灵批处理边界框始终为空。但也可以使用精灵批处理子对象的边界框来检查碰撞

CCArray* children = _gameBatch.children;
NSUInteger childrenCount = children.count;
CCSprite* child;
for (NSUInteger pos = 0; pos < childrenCount; pos++) {
    child = [children objectAtIndex:pos];
    CGRect box = child.boundingBox;
}
CCArray*children=\u gameBatch.children;
nsuiger childrenCount=children.count;
CCSprite*儿童;
对于(整数pos=0;pos
不知道为什么我会被否决