static public int Distance(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.Collider2D self = (UnityEngine.Collider2D)checkSelf(l);
         UnityEngine.Collider2D a1;
         checkType(l, 2, out a1);
         var ret = self.Distance(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
 }
	static public int Distance(IntPtr l) {
		try {
			UnityEngine.Collider2D self=(UnityEngine.Collider2D)checkSelf(l);
			UnityEngine.Collider2D a1;
			checkType(l,2,out a1);
			var ret=self.Distance(a1);
			pushValue(l,true);
			pushValue(l,ret);
			return 2;
		}
		catch(Exception e) {
			return error(l,e);
		}
	}
示例#3
0
 static int QPYX_Distance_YXQP(IntPtr L_YXQP)
 {
     try
     {
         ToLua.CheckArgsCount(L_YXQP, 2);
         UnityEngine.Collider2D         QPYX_obj_YXQP  = (UnityEngine.Collider2D)ToLua.CheckObject <UnityEngine.Collider2D>(L_YXQP, 1);
         UnityEngine.Collider2D         QPYX_arg0_YXQP = (UnityEngine.Collider2D)ToLua.CheckObject <UnityEngine.Collider2D>(L_YXQP, 2);
         UnityEngine.ColliderDistance2D QPYX_o_YXQP    = QPYX_obj_YXQP.Distance(QPYX_arg0_YXQP);
         ToLua.PushValue(L_YXQP, QPYX_o_YXQP);
         return(1);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
 static int Distance(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UnityEngine.Collider2D         obj  = (UnityEngine.Collider2D)ToLua.CheckObject <UnityEngine.Collider2D>(L, 1);
         UnityEngine.Collider2D         arg0 = (UnityEngine.Collider2D)ToLua.CheckObject <UnityEngine.Collider2D>(L, 2);
         UnityEngine.ColliderDistance2D o    = obj.Distance(arg0);
         ToLua.PushValue(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }