Exemplo n.º 1
0
 static public int FitOnScreen_s(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 3)
         {
             UnityEngine.Camera a1;
             checkType(l, 1, out a1);
             UnityEngine.Transform a2;
             checkType(l, 2, out a2);
             UnityEngine.Vector3 a3;
             checkType(l, 3, out a3);
             NGUITools.FitOnScreen(a1, a2, a3);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 4)
         {
             UnityEngine.Camera a1;
             checkType(l, 1, out a1);
             UnityEngine.Transform a2;
             checkType(l, 2, out a2);
             UnityEngine.Transform a3;
             checkType(l, 3, out a3);
             UnityEngine.Vector3 a4;
             checkType(l, 4, out a4);
             NGUITools.FitOnScreen(a1, a2, a3, a4);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 5)
         {
             UnityEngine.Camera a1;
             checkType(l, 1, out a1);
             UnityEngine.Transform a2;
             checkType(l, 2, out a2);
             UnityEngine.Transform a3;
             checkType(l, 3, out a3);
             UnityEngine.Vector3 a4;
             checkType(l, 4, out a4);
             UnityEngine.Bounds a5;
             NGUITools.FitOnScreen(a1, a2, a3, a4, out a5);
             pushValue(l, true);
             pushValue(l, a5);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 2
0
    static int FitOnScreen(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Camera), typeof(UnityEngine.Transform), typeof(UnityEngine.Vector3)))
            {
                UnityEngine.Camera    arg0 = (UnityEngine.Camera)ToLua.ToObject(L, 1);
                UnityEngine.Transform arg1 = (UnityEngine.Transform)ToLua.ToObject(L, 2);
                UnityEngine.Vector3   arg2 = ToLua.ToVector3(L, 3);
                NGUITools.FitOnScreen(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Camera), typeof(UnityEngine.Transform), typeof(UnityEngine.Transform), typeof(UnityEngine.Vector3)))
            {
                UnityEngine.Camera    arg0 = (UnityEngine.Camera)ToLua.ToObject(L, 1);
                UnityEngine.Transform arg1 = (UnityEngine.Transform)ToLua.ToObject(L, 2);
                UnityEngine.Transform arg2 = (UnityEngine.Transform)ToLua.ToObject(L, 3);
                UnityEngine.Vector3   arg3 = ToLua.ToVector3(L, 4);
                NGUITools.FitOnScreen(arg0, arg1, arg2, arg3);
                return(0);
            }
            else if (count == 5 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Camera), typeof(UnityEngine.Transform), typeof(UnityEngine.Transform), typeof(UnityEngine.Vector3), typeof(LuaInterface.LuaOut <UnityEngine.Bounds>)))
            {
                UnityEngine.Camera    arg0 = (UnityEngine.Camera)ToLua.ToObject(L, 1);
                UnityEngine.Transform arg1 = (UnityEngine.Transform)ToLua.ToObject(L, 2);
                UnityEngine.Transform arg2 = (UnityEngine.Transform)ToLua.ToObject(L, 3);
                UnityEngine.Vector3   arg3 = ToLua.ToVector3(L, 4);
                UnityEngine.Bounds    arg4;
                NGUITools.FitOnScreen(arg0, arg1, arg2, arg3, out arg4);
                ToLua.Push(L, arg4);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: NGUITools.FitOnScreen"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }