我创建了两个相同的CCSpriteBatchNode,分别添加不同的CCLayer。
CCSpriteBatchNode *mNode = [param objectForKey:@"BatchNode"];
if (self =[super initWithTexture:mNode.texture rect:rect ])
{
CCAnimation *walkAnim = [CCAnimation animationWithFrames:[[allFrameCache objectAtIndex:0] objectAtIndex:0] delay:frequencyFloat];
CCAction* walkAction = [CCRepeatForever actionWithAction:[CCAnimate actionWithAnimation:walkAnim restoreOriginalFrame:NO]];
[self runAction:walkAction];
}
但它显示:2012-07-15 11:18:27.389 SanGuo_[21379:707] *由于未捕获的异常“NSInternalInconsistencyException”而终止应用程序,原因:“CCSprite 未使用相同的纹理 ID”
我是新手,研究了半天,很郁闷,谁能帮帮我?