27 lines
741 B
C#
27 lines
741 B
C#
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)
|
|
{
|
|
_healthImage.fillAmount = health;
|
|
}
|
|
public void SetHealthText(string healthText)
|
|
{
|
|
_healthText.text = healthText;
|
|
}
|
|
}
|
|
}
|