I hope to modify the color of this blue picture and the white background picture below
How should I write it
css style just use for like this
Sprites have a color property. I use it all the time to change the color of the sprite.
No need to play with the css.
Develop games in your browser. Powerful, performant & highly capable.
this is progress bar
i don't know how chance is in c3
Got it. Your screenshot looked like you were using a custom progress bar, not the plugin. Sorry.
Use a sprite or TiledBackground object instead of the progress bar. It's very easy - set origin point on the left and update its width, for example:
Bar Set width to 300*(Player.health/100)
where 300 is the maximum width, and 100 is the maximum health.
Here is a demo:
howtoconstructdemos.com/simple-healthbar
I know how to make this. At present, what I want to do is that different monsters have health bars, but when the health bars are composed of three pictures
Don't use ProgressBar object for monsters! There are too many problems with ProgressBar, it's not made for such games.
Use a sprite or TiledBackground, put it into a container with the monster sprite, pin to monster and change its width.