// Update is called once per frame void Update() { float hp = mainCharacter.GetHP(); float amount = (hp / 100) * 0.5f; healthBar.fillAmount = amount; }
// Update is called once per frame void Update() { float hp = mainCharacter.GetHP(); float amount = (hp / 100) * 0.5f; healthBar.fillAmount = amount; }