| 123456789101112131415161718 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class UIHP : MonoBehaviour
- {
- public Image imgHp;
- public void Show(int hp, int totalHp)
- {
- imgHp.fillAmount = (float)hp / (float)totalHp;
- }
- public void Show(float hp, float totalHp)
- {
- imgHp.fillAmount = hp / totalHp;
- }
- }
|