public static void RegisterWidget(string path, int showCode, int hideCode) { GameEventCenter gameEventCenter = GameEventCenter.GetInstance(); gameEventCenter.RegisterEvent(showCode, delegate(GameEvent evt) { Show(path); }); gameEventCenter.RegisterEvent(hideCode, delegate(GameEvent evt) { Hide(path); }); }
public static void DispatchEvent(int code) { GameEventCenter.GetInstance().DispatchEvent(code); }
public static void DispatchEvent(GameEvent evt) { GameEventCenter.GetInstance().DispatchEvent(evt); }
public static int GetEventCode(string name) { return(GameEventCenter.GetInstance().GetEventCode(name)); }