Пример #1
0
    // Update is called once per frame
    void Update()
    {
        float hp     = mainCharacter.GetHP();
        float amount = (hp / 100) * 0.5f;

        healthBar.fillAmount = amount;
    }