断言错误:ccArray.cpp 函数:ccArrayAppendObject 行:120
这是我尝试使用此代码执行帧动画时的错误:
CCArray *frames= CCArray::create();
for(int i=0 ; i<=21 ; i++)
{
CCString *frame=CCString::createWithFormat("mypong%04d.png",i);
frames->addObject(CCSpriteFrameCache::sharedSpriteFrameCache()->spriteFrameByName(frame->getCString()));
}
sprite->runAction(CCAnimate::create(CCAnimation::create(frames,.01)));
}
它在 TouchesBegan 方法下。有人知道我在这里做错了什么吗?
注意:我在 win7 64 位,cocos2dx 2.0.1,ndk r8b