S
S
SkyCrusher2017-11-25 16:06:18
2D
SkyCrusher, 2017-11-25 16:06:18

How to make an animated Health Bar in Unity3D?

Making an Android game with Unity. Language - C#. We want to make a beautifully animated health bar (in the style of Low Poly, triangles, when it leaves, unhook and rise up), but we can’t find anyone who would explain how to do it, except perhaps for one tutorial where it is proposed to make a hundred frames animation and give each frame one percent health. Can someone tell me how it's done at all? Maybe there are some other options?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TheTalion, 2017-11-25
@SkyCrusher

It is not entirely clear what you want, what triangles, where they go, and so on. But suppose we have 10 of these triangles, which equals 10 lives. And each triangle should play its own animation when the xp value is reduced or added. What is the problem?
Create 10 triangles on the canvas where xp should be displayed and connect them with the xp value in some script (create an array of triangles and put a function in the xp value set-er that will calculate which animation of the triangle to do - adding or subtracting). Those. when we subtract xp, we start one animation, when we add it, then another one.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question