0

How does one display a CCLayer in cocos2d but making it appear as a progress bar in the sense that the layer should appear from the left and extend to the right until it is fully shown?

Can this be done using a series of images and setting the CCLayer to them in a sequence, if so, how is this done in cocos2d?

Are there any other ways of doing it?

Thanks

user773578
  • 1,161
  • 2
  • 13
  • 24

1 Answers1

1

You can set the position of the layer out of the screen bounds, then perform a CCMoveTo action. Something like:

[layer runAction:[CCMoveTo actionWithDuration:time position:pos]];

where pos is the position inside the screen bounds

andreamazz
  • 4,256
  • 1
  • 20
  • 36