using TMPro; using UnityEngine; using UnityEngine.UI; namespace BrewMonster { public class UINPC : MonoBehaviour { [SerializeField] private TextMeshProUGUI _nameText; [SerializeField] private TextMeshProUGUI _healthText; [SerializeField] private Image _healthImage; // Start is called once before the first execution of Update after the MonoBehaviour is created public void SetName(string name) { _nameText.text = name; } public void SetHealthImage(float health) { if(_healthImage != null) _healthImage.fillAmount = health; } public void SetHealthText(string healthText) { if(_healthText != null) _healthText.text = healthText; } } }