这是我收到的错误:
*由于未捕获的异常“NSInternalInconsistencyException”而终止应用程序,原因:“CCSprite: setTexture 在使用 CCSpriteBatchNode 渲染精灵时不起作用”
当我试图通过动画运行时。
这是我创作的动画:
_tokenAnimation = [[CCAnimation alloc] init];
int frameCount = 12;
for (int i = 1; i <= frameCount; i++)
{
CCSpriteFrame *frame = [[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:[NSString stringWithFormat:@"Token Ball 000%d.png", i]];
[_tokenAnimation addFrame:frame delay:0.1];
}
这是我在调用动画-以前没看过吗?
GameObject *creditPickup = [_creditPickups nextSprite];
creditPickup.position = ccp(_creditPosition.x, _creditPosition.y);
[creditPickup revive];
[creditPickup runAction:[CCRepeatForever actionWithAction:[CCAnimate actionWithAnimation:_tokenAnimation restoreOriginalFrame:NO]]];
[creditPickup runAction: [CCSequence actions:
[CCMoveBy actionWithDuration:5.0 position:ccp(-_winSize.width*1.5, 0)],
[CCCallFuncN actionWithTarget:self selector:@selector(invisNode:)], nil]];
我听说 CCSpriteBatchNode 不好?如果是这样,我怎样才能改变我的精灵表的阅读?
还有什么我做错了吗?