Exemplo n.º 1
0
    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);
        });
    }
Exemplo n.º 2
0
 public static void DispatchEvent(int code)
 {
     GameEventCenter.GetInstance().DispatchEvent(code);
 }
Exemplo n.º 3
0
 public static void DispatchEvent(GameEvent evt)
 {
     GameEventCenter.GetInstance().DispatchEvent(evt);
 }
Exemplo n.º 4
0
 public static int GetEventCode(string name)
 {
     return(GameEventCenter.GetInstance().GetEventCode(name));
 }