开发者

Power Meter - Cocos2d/Box2d

开发者 https://www.devze.com 2023-03-27 20:36 出处:网络
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.

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

精彩评论

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