Files
test/Assets/PerfectWorld/Scripts/UI/GamePlay/UINPC.cs
T
2025-10-30 18:50:02 +07:00

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;
}
}
}