0
votes

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.

1

1 Answers

1
votes

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