-
本帖最后由 tangbo6 于 2013-5-27 21:24 编辑 *
CCArray *frames = CCArray::create(); for (int i = from; i <= to; i++) { CCString *str = CCString::createWithFormat("a%04d.png", i); CCLog(str->getCString()); frames->addObject(CCSpriteFrameCache::sharedSpriteFrameCache()->spriteFrameByName(str->getCString())); } CCAnimation *animation = CCAnimation::create(frames, 1.0f/24.0f); CCAnimate *a = CCAnimate::create(animation); this->runAction(a);
程序老是运行到这里出错:
Assertion failed!
Expression:dynami_cast<CCAnimationFrame*>(*arr)