Beispiel #1
0
 public static int set_localRotation(System.IntPtr L)
 {
     if (true && LuaAPI.IsObject(L, 1) && LuaAPI.IsVector4(L, 3))
     {
         UnityEngine.Transform  arg0 = (UnityEngine.Transform)LuaCallback.ToObject(L, 1);
         UnityEngine.Quaternion arg1 = (UnityEngine.Quaternion)LuaCallback.ToQuaternion(L, 3);
         arg0.localRotation = arg1;
         return(0);
     }
     return(0);
 }
Beispiel #2
0
    public static int Instantiate(System.IntPtr L)
    {
        int nargs = LuaAPI.GetTop(L);

        if (nargs == 3 && LuaAPI.IsObject(L, 1) && LuaAPI.IsVector3(L, 2) && LuaAPI.IsVector4(L, 3))
        {
            UnityEngine.Object     arg0 = (UnityEngine.Object)LuaCallback.ToObject(L, 1);
            UnityEngine.Vector3    arg1 = (UnityEngine.Vector3)LuaCallback.ToVector3(L, 2);
            UnityEngine.Quaternion arg2 = (UnityEngine.Quaternion)LuaCallback.ToQuaternion(L, 3);
            UnityEngine.Object     res  = UnityEngine.Object.Instantiate(arg0, arg1, arg2);
            LuaCallback.PushObject(L, res);
            return(1);
        }
        if (nargs == 4 && LuaAPI.IsObject(L, 1) && LuaAPI.IsVector3(L, 2) && LuaAPI.IsVector4(L, 3) && LuaAPI.IsObject(L, 4))
        {
            UnityEngine.Object     arg0 = (UnityEngine.Object)LuaCallback.ToObject(L, 1);
            UnityEngine.Vector3    arg1 = (UnityEngine.Vector3)LuaCallback.ToVector3(L, 2);
            UnityEngine.Quaternion arg2 = (UnityEngine.Quaternion)LuaCallback.ToQuaternion(L, 3);
            UnityEngine.Transform  arg3 = (UnityEngine.Transform)LuaCallback.ToObject(L, 4);
            UnityEngine.Object     res  = UnityEngine.Object.Instantiate(arg0, arg1, arg2, arg3);
            LuaCallback.PushObject(L, res);
            return(1);
        }
        if (nargs == 1 && LuaAPI.IsObject(L, 1))
        {
            UnityEngine.Object arg0 = (UnityEngine.Object)LuaCallback.ToObject(L, 1);
            UnityEngine.Object res  = UnityEngine.Object.Instantiate(arg0);
            LuaCallback.PushObject(L, res);
            return(1);
        }
        if (nargs == 2 && LuaAPI.IsObject(L, 1) && LuaAPI.IsObject(L, 2))
        {
            UnityEngine.Object    arg0 = (UnityEngine.Object)LuaCallback.ToObject(L, 1);
            UnityEngine.Transform arg1 = (UnityEngine.Transform)LuaCallback.ToObject(L, 2);
            UnityEngine.Object    res  = UnityEngine.Object.Instantiate(arg0, arg1);
            LuaCallback.PushObject(L, res);
            return(1);
        }
        if (nargs == 3 && LuaAPI.IsObject(L, 1) && LuaAPI.IsObject(L, 2) && LuaAPI.IsBool(L, 3))
        {
            UnityEngine.Object    arg0 = (UnityEngine.Object)LuaCallback.ToObject(L, 1);
            UnityEngine.Transform arg1 = (UnityEngine.Transform)LuaCallback.ToObject(L, 2);
            System.Boolean        arg2 = (System.Boolean)LuaCallback.ToBool(L, 3);
            UnityEngine.Object    res  = UnityEngine.Object.Instantiate(arg0, arg1, arg2);
            LuaCallback.PushObject(L, res);
            return(1);
        }
        return(0);
    }
Beispiel #3
0
    public static int SetPositionAndRotation(System.IntPtr L)
    {
        int nargs = LuaAPI.GetTop(L);

        if (nargs == 3 && LuaAPI.IsObject(L, 1) && LuaAPI.IsVector3(L, 2) && LuaAPI.IsVector4(L, 3))
        {
            UnityEngine.Transform  arg0 = (UnityEngine.Transform)LuaCallback.ToObject(L, 1);
            UnityEngine.Vector3    arg1 = (UnityEngine.Vector3)LuaCallback.ToVector3(L, 2);
            UnityEngine.Quaternion arg2 = (UnityEngine.Quaternion)LuaCallback.ToQuaternion(L, 3);
            arg0.SetPositionAndRotation(arg1, arg2);

            return(0);
        }
        return(0);
    }