How to make a life bar in the form of an arc?I want to make life can not in the form of strips .a in a semicircle, as it can be implemented?
Develop games in your browser. Powerful, performant & highly capable.
this is not very 'elegant' but you could use the layered approach; put your semi circle 'strip' on top, with another beneath that which will rotate into view of the 'strip'. it would probably involve a mask or something of that sort.
sorry i cannot be more specific. i just saw the solution in my head when i read your question. someone the forums may know how to implement what i suggested.
You could ofcourse just use a sprite with animationframes for this or you could use the approach above, using another sprite as a mask and rotating it as needed..
the second solution would involve using blendmodes, a great example of which can be found in the new project dialog..
At the expense of a good mask variant.animatsiya not poydet.zachem extra sprites ... maybe there is a formula or something like that then? And what blendmode ???
This thread may be of interest (the first solution I would not recommand,)
Thank you very much!)