0
votes

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

1

1 Answers

1
votes

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