求大神指点一下
提示我这个 sprintf错我现在都还是 糊涂起的 怎么错了
我看你使用的是2.2.x的版本,建议你使用CCString这个类
我用的是2.1.4 版本的
CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile(“Globefishs/Globe_fish.plist”);
CCArray* array = CCArray::create();
array->retain();
for(int i=0; i!=12;i++)
{
CCLOG(CCString::createWithFormat("%s%d.png","Globe_fish_",i)->getCString());
array->addObject(CCSpriteFrameCache::sharedSpriteFrameCache()->
spriteFrameByName(CCString::createWithFormat("%s%d.png","Globe_fish_",i)->getCString()));
}
sp = CCSprite::createWithSpriteFrame((CCSpriteFrame*)array->objectAtIndex(0));
CCAnimation* animation1= CCAnimation::createWithSpriteFrames(array,0.1f);
CCAnimate* animat1 = CCAnimate::create(animation1);
大哥 是不是像这样就不会出现这个错误了
你编译一下试试,我觉得不会有什么问题了
楼主是显摆QQ截图的吧
哈哈哈哈哈哈哈哈哈哈哈哈
哦大哥不是这么回事 试一下拉快了 拉多了忘记搞掉
一定是这样!没错!哈哈,早