Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Drawing a circle health bar around a sprite


MarzSocks
 Share

Recommended Posts

11 hours ago, tokumaru said:

The tween is modifying a property of the "angle" object, and this property is being used to draw the arc and to calculate its color.

I thought that might be the case, so does that mean every arc that is drawn will have the tween? Regardless of if one wants the tween on that arc or not?

Link to comment
Share on other sites

You could simply update the arc's angle and color based on the current health value and it would change instantaneously to that configuration, but if you plan on animating the changes you'll have to modify the color and the angle gradually over time. Tweening is one way to do it (and was probably used in the example for simplicity's sake), but you could just as well use your own logic every frame to make the arc's angle "catch up" with the current health value.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...