I want to change the size of a Sprite which is animating. How can I do this ? I tried to change its size by using setScale property but it is not working here. where I am doing wrong ?
CCArray* frames = CCArray::createWithCapacity(3);
CCSpriteFrameCache* frameCache = CCSpriteFrameCache::sharedSpriteFrameCache();
char file[100] = {0};
for (int i = 0; i < 3; i++)
{
sprintf(file, "bird%d.png", i);
CCSpriteFrame* frame = frameCache->spriteFrameByName(file);
frames->addObject(frame);
}
CCAnimation* animation = CCAnimation::createWithSpriteFrames(frames, 0.1);
CCAnimate* animate = CCAnimate::create(animation);
CCRepeatForever* repeat = CCRepeatForever::create(animate);
bird->runAction(repeat);
bird->setScale(0.7);