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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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