Exemple #1
0
        void UpdateBar()
        {
            if (hpBar == null)
            {
                return;
            }

            float hpRatio = hp.GetCurrentHP() / hp.GetMaxHP();

            hpBar.transform.localScale = new Vector2(hpRatio, 1f);
        }