Hi for all! One more time, a need help :P ..... In my game, i have many animations with Animation Class (in my case, more appropriate). In one of these animations, I need to know in what frame it is, because I realize the exchange of a color of sprites to represent a transition. Currently I am using a AtlasSpriteManager to achieve the effect, but wanted to use only one solution, make the code cleaner.
My code in onEnter:
animation1 = [Animation animationWithName:@"bola" delay:0.04f];
for( int i=1;i<=40;i++){
[animation1 addFrameWithFilename: [NSMutableString stringWithFormat:(i<10?@"bole_000%d.png":@"bole_00%d.png"), i]];
}
animado1 = [Animate actionWithAnimation: animation1];
action1 = [Repeat actionWithAction:animado1 times:waitTempo];
[action1 retain];
[[self getChildByTag:2] runAction:action1];
in my schedule function upadate, I try this, but don't work, it always returns the initial frame, never the current:
NSLog(@"frames: %@",[[animation1 frames] objectAtIndex:0]);
There is a possible solution using the Animation class?