私は画像のアトラスを持っていますが、それらは 80 x 80 です。なにが問題ですか?アニメーションを実行すると、非常に正しく見えません。
コードは次のとおりです。
SKTextureAtlas *myAtlas = [SKTextureAtlas atlasNamed:@"my"];
NSInteger numberOfImages = [run.textureNames count];
NSLog(@"atlas: %@", myAtlas);
for (int i = 0; i < numberOfImages; i++) {
NSString *textureName = [NSString stringWithFormat:@"walk%.2d", i];
SKTexture *temp = [myAtlas textureNamed:textureName];
[self.runningFrames addObject:temp];
}
ロギングはこれを返します:
<SKTextureAtlas> 'my' 16 textures:
(
"<SKTexture> 'walk00.png' (33 x 80)",
"<SKTexture> 'walk01.png' (80 x 80)",
"<SKTexture> 'walk02.png' (33 x 80)",
... omitted
)
何故ですか?アニメーションが完全に手に負えなくなったり、左右にずれたりします。