예제 #1
0
 public static void UnRegisterClickEvent(GameObject go, TouchEventDistrubtionCall call)
 {
     if (go != null && _clickListeners.ContainsKey(go))
     {
         _clickListeners[go] -= call;
         if (_clickListeners[go] == null || _clickListeners[go].GetInvocationList().Length == 0)
         {
             _clickListeners.Remove(go);
         }
     }
 }
예제 #2
0
 public static bool RegisterClickEventAtHead(GameObject go, TouchEventDistrubtionCall call)
 {
     if (go != null && _clickListeners.ContainsKey(go))
     {
         _clickListeners[go] = call + _clickListeners[go];
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #3
0
 public static void RegisterClickEvent(GameObject go, TouchEventDistrubtionCall call)
 {
     if (go != null)
     {
         if (!_clickListeners.ContainsKey(go))
         {
             _clickListeners.Add(go, call);
         }
         else
         {
             _clickListeners[go] += call;
         }
     }
 }
예제 #4
0
    public static void UnRegisterDownEvent(GameObject go, TouchEventDistrubtionCall call)
    {
        if (go == null)
        {
            return;
        }

        if (_touchDownListeners.ContainsKey(go))
        {
            _touchDownListeners[go] -= call;
            if (_touchDownListeners[go] == null ||
                _touchDownListeners[go].GetInvocationList().Length == 0)
            {
                _touchDownListeners.Remove(go);
            }
        }
    }