using UnityEngine;
namespace LobbyRelaySample.UI
{
///
/// UI element that is displayed when the lobby is in a particular state (e.g. counting down, in-game).
///
public class ShowWhenLobbyStateUI : ObserverPanel
{
[SerializeField]
private LobbyState m_ShowThisWhen;
public override void ObservedUpdated(LocalLobby observed)
{
if (m_ShowThisWhen.HasFlag(observed.State))
Show();
else
Hide();
}
}
}