コード例 #1
0
ファイル: UnGfxWrap.cs プロジェクト: atom-chen/shisanshui-1
    static int Convert(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Quaternion)))
            {
                UnityEngine.Quaternion arg0 = ToLua.ToQuaternion(L, 1);
                UnityEngine.Matrix4x4  o    = UnGfx.Convert(arg0);
                ToLua.PushValue(L, o);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Bounds), typeof(UnityEngine.BoxCollider)))
            {
                UnityEngine.Bounds      arg0 = ToLua.ToBounds(L, 1);
                UnityEngine.BoxCollider arg1 = (UnityEngine.BoxCollider)ToLua.ToObject(L, 2);
                UnGfx.Convert(arg0, ref arg1);
                ToLua.Push(L, arg1);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Matrix4x4), typeof(UnityEngine.Quaternion)))
            {
                UnityEngine.Matrix4x4  arg0 = (UnityEngine.Matrix4x4)ToLua.ToObject(L, 1);
                UnityEngine.Quaternion arg1 = ToLua.ToQuaternion(L, 2);
                UnGfx.Convert(ref arg0, ref arg1);
                ToLua.PushValue(L, arg0);
                ToLua.Push(L, arg1);
                return(2);
            }
            else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Quaternion), typeof(UnityEngine.Matrix4x4)))
            {
                UnityEngine.Quaternion arg0 = ToLua.ToQuaternion(L, 1);
                UnityEngine.Matrix4x4  arg1 = (UnityEngine.Matrix4x4)ToLua.ToObject(L, 2);
                UnGfx.Convert(arg0, ref arg1);
                ToLua.PushValue(L, arg1);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnGfx.Convert"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }