Hi everyone,
I am trying to build and execute an animation. The issue is that I have sprites underneath and on top of the images I am animating. These images have to adjust to the size and position of the sprites I have defined:
Sprite *liquidLevel1 = [Sprite spriteWithFile:@"LiquidLevel1.png"];
liquidLevel1.position = ccp( size.width /2 , size.height/2 );
All of my images are the same size. So when I build and run the animation, the images corresponding to the frames are displayed at a different coordinate as my sprites. Any ideas on how to solve this problem?
Here is the code for the animation:
Animation* animation = [Animation animationWithName:@"liquidRise" delay:0.2f];
for( int i=1;i<15;i++)
[animation addFrameWithFilename: [NSString stringWithFormat:@"LiquidLevel%d.png", i]];
id action = [Animate actionWithAnimation: animation];
[liquidLevel1 runAction:action];
Thanks in advance.