Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have a game that uses a progress bar to inform player of level of certain stats of the player. For example hunger, when it starts at zero and slowly adds up to maximum bar. When he eats the hunger reduces.

I tried implementing as progressBar, but it works wrong, as the bar expands both ways, and I need it to grow one side only. Also I had hard time setting the bar, since it uses actions.

Is there an easy way to do it?

share|improve this question
    
It might be useful if you provide some of the code you're using. When I implement the progress bar, I usually make sure that the anchor point for the bar that you're scaling is at ccp(0, 0.5f) so you're anchoring on the left side. This way when you scale the bar is scaled to the right and not both ways. –  Jamornh Aug 10 '12 at 20:13
    
@Jamornh Well code that I use is class Pet and it has inner variable Hunger that I want to be shown on screen as bar. That's it. –  Dvole Aug 11 '12 at 6:16
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.