コード例 #1
0
 public void Init(string path, ResourcePrioritizedCache owner, LoadPriority priority)
 {
     m_AssetPath     = path;
     m_Priority      = priority;
     m_Owner         = owner;
     m_LoadedProcess = LoadEnd;
 }
コード例 #2
0
 public void Reset()
 {
     m_AssetPath = "";
     m_Priority  = LoadPriority.Hight;
     m_Owner     = null;
     m_CallbackSet.Clear();
     m_CallbackReference.Clear();
     m_LoadedProcess = null;
 }
コード例 #3
0
        static int _s_set_m_MaxLoadingCount(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                ResourcePrioritizedCache gen_to_be_invoked = (ResourcePrioritizedCache)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.m_MaxLoadingCount = LuaAPI.xlua_tointeger(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
コード例 #4
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    ResourcePrioritizedCache gen_ret = new ResourcePrioritizedCache();
                    translator.Push(L, gen_ret);

                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to ResourcePrioritizedCache constructor!"));
        }
コード例 #5
0
        static int _m_Destroy(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                ResourcePrioritizedCache gen_to_be_invoked = (ResourcePrioritizedCache)translator.FastGetCSObj(L, 1);



                {
                    gen_to_be_invoked.Destroy(  );



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
コード例 #6
0
        static int _m_LoadAsync(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                ResourcePrioritizedCache gen_to_be_invoked = (ResourcePrioritizedCache)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <System.Action <AssetItem> >(L, 3) && translator.Assignable <ResourcePrioritizedCache.LoadPriority>(L, 4))
                {
                    string _assetPath = LuaAPI.lua_tostring(L, 2);
                    System.Action <AssetItem>             _call = translator.GetDelegate <System.Action <AssetItem> >(L, 3);
                    ResourcePrioritizedCache.LoadPriority _priority; translator.Get(L, 4, out _priority);

                    gen_to_be_invoked.LoadAsync(_assetPath, _call, _priority);



                    return(0);
                }
                if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <System.Action <AssetItem> >(L, 3))
                {
                    string _assetPath = LuaAPI.lua_tostring(L, 2);
                    System.Action <AssetItem> _call = translator.GetDelegate <System.Action <AssetItem> >(L, 3);

                    gen_to_be_invoked.LoadAsync(_assetPath, _call);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to ResourcePrioritizedCache.LoadAsync!"));
        }
コード例 #7
0
        static int _m_Recycle(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                ResourcePrioritizedCache gen_to_be_invoked = (ResourcePrioritizedCache)translator.FastGetCSObj(L, 1);



                {
                    AssetItem _item = (AssetItem)translator.GetObject(L, 2, typeof(AssetItem));

                    gen_to_be_invoked.Recycle(_item);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
コード例 #8
0
        static int _m_Preload(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                ResourcePrioritizedCache gen_to_be_invoked = (ResourcePrioritizedCache)translator.FastGetCSObj(L, 1);



                {
                    string _assetPath = LuaAPI.lua_tostring(L, 2);

                    gen_to_be_invoked.Preload(_assetPath);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
コード例 #9
0
        static int _m_PreLoadAsync(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                ResourcePrioritizedCache gen_to_be_invoked = (ResourcePrioritizedCache)translator.FastGetCSObj(L, 1);



                {
                    System.Collections.Generic.List <string> _assetPaths = (System.Collections.Generic.List <string>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List <string>));
                    System.Action _okCall = translator.GetDelegate <System.Action>(L, 3);

                    gen_to_be_invoked.PreLoadAsync(_assetPaths, _okCall);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }