using System.Collections; using System.Collections.Generic; using UnityEngine; namespace KairoEngine { public class MenuEvents { public static event System.Action OnOpenPanel; public static event System.Action OnClosePanel; public static event System.Action OnExecuteMenuItem; public static void OpenPanel(string panelName, bool closePrevious) { if(OnOpenPanel != null) { OnOpenPanel(panelName, closePrevious); } } public static void ClosePanel(string panelName) { if(OnClosePanel != null) { OnClosePanel(panelName); } } public static void ExecuteMenuItem(string panelName, string menuItemName) { if(OnExecuteMenuItem != null) { OnExecuteMenuItem(panelName, menuItemName); } } } }