我为CCAnimation使用了一些png精灵:
self.heroAnim = [CCAnimation animation];
for(int i = 1; i <= count; ++i) {
[self.heroAnim addFrameWithFilename:[NSString stringWithFormat:@"%@_%d_%d.png", _spriteName, currentLevel, i]];
}
self.walkAction = [CCRepeatForever actionWithAction:[CCAnimate actionWithAnimation:self.heroAnim restoreOriginalFrame:NO]];
但现在我必须改变CCAnimation的比例(大约* 0.75)你能给我一些建议来实现吗?我的CCAnimation只有单独的png文件。我不想在物理上调整精灵的文件大小。
答案 0 :(得分:2)
您可以尝试更改用于运行此动画的精灵的scale
属性。 Sprite应自动调整动画的所有帧。