static public int GetContacts(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
         UnityEngine.Collision2D      self = (UnityEngine.Collision2D)checkSelf(l);
         UnityEngine.ContactPoint2D[] a1;
         checkArray(l, 2, out a1);
         var ret = self.GetContacts(a1);
         pushValue(l, true);
         pushValue(l, ret);
         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
 }
Ejemplo n.º 2
0
 static public int GetContacts(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, 2, typeof(UnityEngine.ContactPoint2D[])))
         {
             UnityEngine.Collision2D      self = (UnityEngine.Collision2D)checkSelf(l);
             UnityEngine.ContactPoint2D[] a1;
             checkArray(l, 2, out a1);
             var ret = self.GetContacts(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (matchType(l, argc, 2, typeof(List <UnityEngine.ContactPoint2D>)))
         {
             UnityEngine.Collision2D self = (UnityEngine.Collision2D)checkSelf(l);
             System.Collections.Generic.List <UnityEngine.ContactPoint2D> a1;
             checkType(l, 2, out a1);
             var ret = self.GetContacts(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function GetContacts 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
 }
 static public int GetContacts(IntPtr l)
 {
     try {
         UnityEngine.Collision2D      self = (UnityEngine.Collision2D)checkSelf(l);
         UnityEngine.ContactPoint2D[] a1;
         checkType(l, 2, out a1);
         var ret = self.GetContacts(a1);
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 4
0
 static int GetContacts(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UnityEngine.Collision2D      obj  = (UnityEngine.Collision2D)ToLua.CheckObject <UnityEngine.Collision2D>(L, 1);
         UnityEngine.ContactPoint2D[] arg0 = ToLua.CheckStructArray <UnityEngine.ContactPoint2D>(L, 2);
         int o = obj.GetContacts(arg0);
         LuaDLL.lua_pushinteger(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }