Esempio n. 1
0
 static public int set_onDrop(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         DropEventListener self = (DropEventListener)checkSelf(l);
         SLua.LuaFunction  v;
         checkType(l, 2, out v);
         self.onDrop = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Esempio n. 2
0
 static public int OnPointerExit(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         DropEventListener self = (DropEventListener)checkSelf(l);
         UnityEngine.EventSystems.PointerEventData a1;
         checkType(l, 2, out a1);
         self.OnPointerExit(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Esempio n. 3
0
    static public DropEventListener Get(GameObject go, LuaTable target)
    {
        DropEventListener listener = go.GetComponent <DropEventListener>();

        if (listener == null)
        {
            listener = go.AddComponent <DropEventListener>();
        }
        listener.mTarget = target;
        return(listener);
    }
Esempio n. 4
0
 static public int Get_s(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         int argc = LuaDLL.lua_gettop(l);
         if (matchType(l, argc, 1, typeof(UnityEngine.GameObject)))
         {
             UnityEngine.GameObject a1;
             checkType(l, 1, out a1);
             var ret = DropEventListener.Get(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (matchType(l, argc, 1, typeof(UnityEngine.Transform)))
         {
             UnityEngine.Transform a1;
             checkType(l, 1, out a1);
             var ret = DropEventListener.Get(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (matchType(l, argc, 1, typeof(UnityEngine.GameObject), typeof(SLua.LuaTable)))
         {
             UnityEngine.GameObject a1;
             checkType(l, 1, out a1);
             SLua.LuaTable a2;
             checkType(l, 2, out a2);
             var ret = DropEventListener.Get(a1, a2);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (matchType(l, argc, 1, typeof(UnityEngine.Transform), typeof(SLua.LuaTable)))
         {
             UnityEngine.Transform a1;
             checkType(l, 1, out a1);
             SLua.LuaTable a2;
             checkType(l, 2, out a2);
             var ret = DropEventListener.Get(a1, a2);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function Get to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Esempio n. 5
0
 static public DropEventListener Get(Transform tf)
 {
     return(DropEventListener.Get(tf.gameObject, null));
 }
Esempio n. 6
0
 static public DropEventListener Get(Transform tf, LuaTable target)
 {
     return(DropEventListener.Get(tf.gameObject, target));
 }
Esempio n. 7
0
 static public DropEventListener Get(GameObject go)
 {
     return(DropEventListener.Get(go, null));
 }