Quote:
Originally Posted by ChrisMayer
Assuming your sprite is a UIImageView:
Code:
myImageview.animationImages = [NSArray arrayWithObjects:[UIImage imageNamed:@"frame_1.png"],[UIImage imageNamed:@"frame_2.png"],nil];
myImageview.animationDuration=0.5;myImageview.animationRepeatCount=0;[myImageview startAnimating];
where animationDuration=0.5 is the total duration of the animation in seconds.
|
i tried that, but i dont know where to declare the myImageview. Also, what would happen if my sprite wasnt a UIImageView? something like:
AtlasSpriteManager *spriteManager = (AtlasSpriteManager*)[self getChildByTag:kSpriteManager];
AtlasSprite *one = (AtlasSprite*)[spriteManager getChildByTag:kOne];