Exemplo n.º 1
0
 static public int constructor(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         ScriptRuntime.Plane o;
         if (argc == 5)
         {
             System.Single a1;
             checkType(l, 2, out a1);
             System.Single a2;
             checkType(l, 3, out a2);
             System.Single a3;
             checkType(l, 4, out a3);
             System.Single a4;
             checkType(l, 5, out a4);
             o = new ScriptRuntime.Plane(a1, a2, a3, a4);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (matchType(l, argc, 2, typeof(ScriptRuntime.Vector3), typeof(float)))
         {
             ScriptRuntime.Vector3 a1;
             checkValueType(l, 2, out a1);
             System.Single a2;
             checkType(l, 3, out a2);
             o = new ScriptRuntime.Plane(a1, a2);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (argc == 4)
         {
             ScriptRuntime.Vector3 a1;
             checkValueType(l, 2, out a1);
             ScriptRuntime.Vector3 a2;
             checkValueType(l, 3, out a2);
             ScriptRuntime.Vector3 a3;
             checkValueType(l, 4, out a3);
             o = new ScriptRuntime.Plane(a1, a2, a3);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (matchType(l, argc, 2, typeof(ScriptRuntime.Vector3), typeof(ScriptRuntime.Vector3)))
         {
             ScriptRuntime.Vector3 a1;
             checkValueType(l, 2, out a1);
             ScriptRuntime.Vector3 a2;
             checkValueType(l, 3, out a2);
             o = new ScriptRuntime.Plane(a1, a2);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (argc <= 1)
         {
             o = new ScriptRuntime.Plane();
             pushValue(l, true);
             pushObject(l, o);
             return(2);
         }
         return(error(l, "New object failed."));
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }