Friday 15 March 2013

animation - SKAction animateWithTextures not working properly -



animation - SKAction animateWithTextures not working properly -

i have been writing game helicopter while , trying offer user alternative between 2 helis. used code animate original one, no problems whatsoever:

heliatlas = [sktextureatlas atlasnamed:@"apache"]; nsarray *heliatlasarray = [heliatlas texturenames]; nsarray *heliatlasarraysorted = [heliatlasarray sortedarrayusingselector:@selector(caseinsensitivecompare:)]; nsmutablearray *helitextures = [nsmutablearray array]; (nsstring *filename in heliatlasarraysorted) { sktexture *texture = [heliatlas texturenamed:filename]; [helitextures addobject:texture]; } skaction *animateheli = [skaction animatewithtextures:helitextures timeperframe:.016]; skaction *repeatanimation = [skaction repeatactionforever:animateheli];

now, have used exact same code sec heli,but when tried utilize heli, animation looked glitched. slowed downwards animation, , realized shows first half of animation, , animates through atlas style photos (with 2 side-by side helis cutting in half or upside down, etc).

why 2 atlases acting differently?

i found out atlas has image limit of 50. i've removed images until there 50 left , worked fine there.

animation sprite-kit skaction

No comments:

Post a Comment