Exemplo n.º 1
0
    static int GenBezierPath(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 3)
        {
            List <Vector3> arg0 = (List <Vector3>)LuaScriptMgr.GetNetObject(L, 1, typeof(List <Vector3>));
            int            arg1 = (int)LuaScriptMgr.GetNumber(L, 2);
            LineRenderer   arg2 = (LineRenderer)LuaScriptMgr.GetUnityObject(L, 3, typeof(LineRenderer));
            List <Vector3> o    = UtilCommon.GenBezierPath(arg0, arg1, arg2);
            LuaScriptMgr.PushObject(L, o);
            return(1);
        }
        else if (count == 4)
        {
            Vector3        arg0 = LuaScriptMgr.GetVector3(L, 1);
            Vector3        arg1 = LuaScriptMgr.GetVector3(L, 2);
            int            arg2 = (int)LuaScriptMgr.GetNumber(L, 3);
            LineRenderer   arg3 = (LineRenderer)LuaScriptMgr.GetUnityObject(L, 4, typeof(LineRenderer));
            List <Vector3> o    = UtilCommon.GenBezierPath(arg0, arg1, arg2, arg3);
            LuaScriptMgr.PushObject(L, o);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: UtilCommon.GenBezierPath");
        }

        return(0);
    }