我为我的 CCAnimation 使用了一些 png Sprite :
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 文件。我不想物理地调整 Sprite 文件的大小。
最佳答案
您可以尝试更改用于运行此动画的 Sprite 的scale
属性。 Sprite 应该自动调整动画所有帧的大小。
关于animation - 调整 CCAnimation 的 Sprite 大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12407452/