using UnityEngine;
public class ShowPanelButton : MonoBehaviour
{
///
/// The id of the panel to show
///
public string PanelId;
///
/// The panel show behaviour
///
public PanelShowBehaviour Behaviour;
///
/// Cached reference to the PanelManager
///
private PanelManager _panelManager;
private void Start()
{
// Cache the manager
_panelManager = PanelManager.Instance;
}
public void DoShowPanel()
{
// Show the panel
_panelManager.ShowPanel(PanelId, Behaviour);
}
}