예제 #1
0
 static public int getInt(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
         Custom.IFoo self = (Custom.IFoo)checkSelf(l);
         var         ret  = self.getInt();
         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 setInt(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 3)
         {
             Custom.IFoo  self = (Custom.IFoo)checkSelf(l);
             System.Int32 a1;
             checkType(l, 2, out a1);
             System.Boolean a2;
             checkType(l, 3, out a2);
             self.setInt(a1, a2);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 2)
         {
             Custom.IFoo  self = (Custom.IFoo)checkSelf(l);
             System.Int32 a2;
             checkType(l, 2, out a2);
             self.setInt(a2);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function setInt to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
예제 #3
0
 static public int getInt(IntPtr l)
 {
     try {
         Custom.IFoo self = (Custom.IFoo)checkSelf(l);
         var         ret  = self.getInt();
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
예제 #4
0
 static public int setInt(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 (argc == 3)
         {
             Custom.IFoo  self = (Custom.IFoo)checkSelf(l);
             System.Int32 a1;
             checkType(l, 2, out a1);
             System.Boolean a2;
             checkType(l, 3, out a2);
             self.setInt(a1, a2);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 2)
         {
             Custom.IFoo  self = (Custom.IFoo)checkSelf(l);
             System.Int32 a2;
             checkType(l, 2, out a2);
             self.setInt(a2);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function setInt 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
 }
예제 #5
0
 static public int setInt(IntPtr l)
 {
     try {
         Custom.IFoo  self = (Custom.IFoo)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         System.Boolean a2;
         checkType(l, 3, out a2);
         self.setInt(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
예제 #6
0
 public static void setInt(this Custom.IFoo f, int i)
 {
 }