为什么第 2 行的动画显示为错误“无法解析函数'动画'”?
CCSprite * sprite = CCSprite::create("start.png");
CCAnimation * anim = CCAnimation::animation();
anim->addSpriteFrameWithFileName("start.png");
anim->addSpriteFrameWithFileName("take.png");
anim->addSpriteFrameWithFileName("action.png");
anim->setLoops(1);
anim->setDelayPerUnit(0.1f);
sprite->runAction(CCAnimate::create(anim));
sprite->setPosition(ccp(450,425));
this->addChild(sprite, -1);
float cX = size.width / sprite->getContentSize().width/1.8;
float cY = size.height / sprite->getContentSize().height/1.2;
sprite->setScaleX(cX);
sprite->setScaleY(cY);