2

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ファイルがあります。スプライトのファイルのサイズを物理的に変更したくありません。

4

1 に答える 1

2

scaleこのアニメーションの実行に使用するスプライトのプロパティを変更してみることができます。スプライトは、アニメーションのすべてのフレームを自動的にサイズ変更する必要があります。

于 2012-09-13T14:05:35.067 に答える