26 lines
705 B
C#
26 lines
705 B
C#
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace BrewMonster
|
|
{
|
|
public class HUDNPC : MonoBehaviour
|
|
{
|
|
[SerializeField] private TextMeshProUGUI _healthText;
|
|
[SerializeField] private TextMeshProUGUI _nameText;
|
|
[SerializeField] private TextMeshProUGUI _statText;
|
|
[SerializeField] private Image healthImage;
|
|
|
|
public void SetText(string healthText, string nameText, string statText)
|
|
{
|
|
_healthText.text = healthText;
|
|
_nameText.text = nameText;
|
|
_statText.text = statText;
|
|
}
|
|
public void SetHealthImage(float health)
|
|
{
|
|
healthImage.fillAmount = health;
|
|
}
|
|
}
|
|
}
|