コード例 #1
0
    static int AsyncLoadResource(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 4)
            {
                MFrameWork.MResourceManager obj = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                MFrameWork.OnAsyncLoadFinished arg1 = (MFrameWork.OnAsyncLoadFinished)ToLua.CheckDelegate <MFrameWork.OnAsyncLoadFinished>(L, 3);
                MFrameWork.LoadResPriority     arg2 = (MFrameWork.LoadResPriority)ToLua.CheckObject(L, 4, typeof(MFrameWork.LoadResPriority));
                obj.AsyncLoadResource(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 5 && TypeChecker.CheckTypes <MFrameWork.OnAsyncLoadFinished, MFrameWork.LoadResPriority, object[]>(L, 3))
            {
                MFrameWork.MResourceManager obj = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                MFrameWork.OnAsyncLoadFinished arg1 = (MFrameWork.OnAsyncLoadFinished)ToLua.ToObject(L, 3);
                MFrameWork.LoadResPriority     arg2 = (MFrameWork.LoadResPriority)ToLua.ToObject(L, 4);
                object[] arg3 = ToLua.ToObjectArray(L, 5);
                obj.AsyncLoadResource(arg0, arg1, arg2, arg3);
                return(0);
            }
            else if (count == 5 && TypeChecker.CheckTypes <MFrameWork.MResourceObjectItem, MFrameWork.OnAsyncLoadObjectFinished, MFrameWork.LoadResPriority>(L, 3))
            {
                MFrameWork.MResourceManager obj = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                MFrameWork.MResourceObjectItem       arg1 = (MFrameWork.MResourceObjectItem)ToLua.ToObject(L, 3);
                MFrameWork.OnAsyncLoadObjectFinished arg2 = (MFrameWork.OnAsyncLoadObjectFinished)ToLua.ToObject(L, 4);
                MFrameWork.LoadResPriority           arg3 = (MFrameWork.LoadResPriority)ToLua.ToObject(L, 5);
                obj.AsyncLoadResource(arg0, arg1, arg2, arg3);
                return(0);
            }
            else if (count == 6)
            {
                MFrameWork.MResourceManager obj = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                MFrameWork.MResourceObjectItem       arg1 = (MFrameWork.MResourceObjectItem)ToLua.CheckObject <MFrameWork.MResourceObjectItem>(L, 3);
                MFrameWork.OnAsyncLoadObjectFinished arg2 = (MFrameWork.OnAsyncLoadObjectFinished)ToLua.CheckDelegate <MFrameWork.OnAsyncLoadObjectFinished>(L, 4);
                MFrameWork.LoadResPriority           arg3 = (MFrameWork.LoadResPriority)ToLua.CheckObject(L, 5, typeof(MFrameWork.LoadResPriority));
                object[] arg4 = ToLua.CheckObjectArray(L, 6);
                obj.AsyncLoadResource(arg0, arg1, arg2, arg3, arg4);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: MFrameWork.MResourceManager.AsyncLoadResource"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #2
0
    static int DeCreaseResourceRef(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes <MFrameWork.MResourceObjectItem>(L, 2))
            {
                MFrameWork.MResourceManager    obj  = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
                MFrameWork.MResourceObjectItem arg0 = (MFrameWork.MResourceObjectItem)ToLua.ToObject(L, 2);
                int o = obj.DeCreaseResourceRef(arg0);
                LuaDLL.lua_pushinteger(L, o);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes <uint>(L, 2))
            {
                MFrameWork.MResourceManager obj = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
                uint arg0 = (uint)LuaDLL.lua_tonumber(L, 2);
                int  o    = obj.DeCreaseResourceRef(arg0);
                LuaDLL.lua_pushinteger(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes <MFrameWork.MResourceObjectItem, int>(L, 2))
            {
                MFrameWork.MResourceManager    obj  = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
                MFrameWork.MResourceObjectItem arg0 = (MFrameWork.MResourceObjectItem)ToLua.ToObject(L, 2);
                int arg1 = (int)LuaDLL.lua_tonumber(L, 3);
                int o    = obj.DeCreaseResourceRef(arg0, arg1);
                LuaDLL.lua_pushinteger(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes <uint, int>(L, 2))
            {
                MFrameWork.MResourceManager obj = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
                uint arg0 = (uint)LuaDLL.lua_tonumber(L, 2);
                int  arg1 = (int)LuaDLL.lua_tonumber(L, 3);
                int  o    = obj.DeCreaseResourceRef(arg0, arg1);
                LuaDLL.lua_pushinteger(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: MFrameWork.MResourceManager.DeCreaseResourceRef"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #3
0
 static int Clear(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         MFrameWork.MResourceManager obj = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
         obj.Clear();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #4
0
 static int InitAsyncManager(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         MFrameWork.MResourceManager obj = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
         bool o = obj.InitAsyncManager();
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #5
0
 static int PreLoadRes(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         MFrameWork.MResourceManager obj = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         obj.PreLoadRes(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #6
0
 static int GetGUID(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         MFrameWork.MResourceManager obj = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
         long o = obj.GetGUID();
         LuaDLL.tolua_pushint64(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #7
0
 static int CancleAsyncLoad(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         MFrameWork.MResourceManager    obj  = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
         MFrameWork.MResourceObjectItem arg0 = (MFrameWork.MResourceObjectItem)ToLua.CheckObject <MFrameWork.MResourceObjectItem>(L, 2);
         bool o = obj.CancleAsyncLoad(arg0);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #8
0
    static int set_ResourcesItemDic(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            MFrameWork.MResourceManager obj = (MFrameWork.MResourceManager)o;
            System.Collections.Generic.Dictionary <uint, MFrameWork.MResourceItem> arg0 = (System.Collections.Generic.Dictionary <uint, MFrameWork.MResourceItem>)ToLua.CheckObject(L, 2, typeof(System.Collections.Generic.Dictionary <uint, MFrameWork.MResourceItem>));
            obj.ResourcesItemDic = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index ResourcesItemDic on a nil value"));
        }
    }
コード例 #9
0
    static int get_ResourcesItemDic(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            MFrameWork.MResourceManager obj = (MFrameWork.MResourceManager)o;
            System.Collections.Generic.Dictionary <uint, MFrameWork.MResourceItem> ret = obj.ResourcesItemDic;
            ToLua.PushSealed(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index ResourcesItemDic on a nil value"));
        }
    }
コード例 #10
0
 static int LoadToResourceObject(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         MFrameWork.MResourceManager obj = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         MFrameWork.MResourceObjectItem arg1 = (MFrameWork.MResourceObjectItem)ToLua.CheckObject <MFrameWork.MResourceObjectItem>(L, 3);
         MFrameWork.MResourceObjectItem o    = obj.LoadToResourceObject(arg0, arg1);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #11
0
    static int _CreateMFrameWork_MResourceManager(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                MFrameWork.MResourceManager obj = new MFrameWork.MResourceManager();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: MFrameWork.MResourceManager.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #12
0
    static int ReleaseResource(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes <MFrameWork.MResourceObjectItem>(L, 2))
            {
                MFrameWork.MResourceManager    obj  = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
                MFrameWork.MResourceObjectItem arg0 = (MFrameWork.MResourceObjectItem)ToLua.ToObject(L, 2);
                bool o = obj.ReleaseResource(arg0);
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes <UnityEngine.Object>(L, 2))
            {
                MFrameWork.MResourceManager obj  = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
                UnityEngine.Object          arg0 = (UnityEngine.Object)ToLua.ToObject(L, 2);
                bool o = obj.ReleaseResource(arg0);
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes <string>(L, 2))
            {
                MFrameWork.MResourceManager obj = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                bool   o    = obj.ReleaseResource(arg0);
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes <MFrameWork.MResourceObjectItem, bool>(L, 2))
            {
                MFrameWork.MResourceManager    obj  = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
                MFrameWork.MResourceObjectItem arg0 = (MFrameWork.MResourceObjectItem)ToLua.ToObject(L, 2);
                bool arg1 = LuaDLL.lua_toboolean(L, 3);
                bool o    = obj.ReleaseResource(arg0, arg1);
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes <UnityEngine.Object, bool>(L, 2))
            {
                MFrameWork.MResourceManager obj  = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
                UnityEngine.Object          arg0 = (UnityEngine.Object)ToLua.ToObject(L, 2);
                bool arg1 = LuaDLL.lua_toboolean(L, 3);
                bool o    = obj.ReleaseResource(arg0, arg1);
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes <string, bool>(L, 2))
            {
                MFrameWork.MResourceManager obj = (MFrameWork.MResourceManager)ToLua.CheckObject <MFrameWork.MResourceManager>(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                bool   arg1 = LuaDLL.lua_toboolean(L, 3);
                bool   o    = obj.ReleaseResource(arg0, arg1);
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: MFrameWork.MResourceManager.ReleaseResource"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }