123456789101112131415161718192021222324252627282930313233343536373839 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- namespace KairoEngine
- {
- public class MenuEvents
- {
- public static event System.Action<string, bool> OnOpenPanel;
- public static event System.Action<string> OnClosePanel;
- public static event System.Action<string, string> 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);
- }
- }
- }
- }
|