开发者

Using a CCLayer as a progress bar

How does one display a CCLayer in cocos2d but maki开发者_开发知识库ng 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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜