开发者

Power Meter - Cocos2d/Box2d

How would I create a power meter that shoots a ball in the direction and power chosen by the player?

I also have a button that will "fire" the ball.

Any ideas开发者_如何学JAVA?


Not sure what you mean, but maybe you can look at CCProgressTimer. With this you can set the percent of the image you want to show (using a horizontal type for your standard progress bar - or whatever).

The code that you need is:

timer.type = kCCProgressTimerTypeHorizontalBarLR;

timer.percentage = 0; //of whatever percent you want to show (you need to update this manually)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜