using System;
using Unity.BossRoom.Utils;
using Unity.Netcode;
using UnityEngine;
namespace Unity.BossRoom.Gameplay.UI
{
///
/// Class containing references to UI children that we can display. Both are disabled by default on prefab.
///
public class UIStateDisplay : MonoBehaviour
{
[SerializeField]
UIName m_UIName;
[SerializeField]
UIHealth m_UIHealth;
public void DisplayName(NetworkVariable networkedName)
{
m_UIName.gameObject.SetActive(true);
m_UIName.Initialize(networkedName);
}
public void DisplayHealth(NetworkVariable networkedHealth, int maxValue)
{
m_UIHealth.gameObject.SetActive(true);
m_UIHealth.Initialize(networkedHealth, maxValue);
}
public void HideHealth()
{
m_UIHealth.gameObject.SetActive(false);
}
}
}