Reputation: 1656
everyone! I have sprite moving by action, what have health bar (progress bar). When the value of health bar will equal zero, sprite should stop and dissappear from the scene. Any ideas how to make this?
Thanks, Alex.
Upvotes: 0
Views: 98
Reputation: 671
You could use a bar image, and change the x-scale according to the sprites health. When health is zero set it to invisible. You can find how to do all this stuff in the CCSprite class reference
Upvotes: 1