Exemple #1
0
        static int _s_set_assetBundleName(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                libx.SceneAssetRequest gen_to_be_invoked = (libx.SceneAssetRequest)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.assetBundleName = LuaAPI.lua_tostring(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
Exemple #2
0
        static int _g_get_progress(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                libx.SceneAssetRequest gen_to_be_invoked = (libx.SceneAssetRequest)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushnumber(L, gen_to_be_invoked.progress);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
Exemple #3
0
        private void LoadGameScene()
        {
            OnProgress(0);
            OnMessage("加载游戏场景");
            var scene = libx.Assets.LoadSceneAsync(libx.R.GetScene("EnterGameScene"));

            Game.Instance.GameStep = Game.Step.ChangeScene;
            _scene           = scene;
            scene.completed += request =>
            {
                if (scene.isDone)
                {
                    OnProgress(1.0f);
                    Game.Instance.GameStep = Game.Step.Start;
                    // Debug.Log("场景切换完成 ======>>");
                }
            };
        }
        static StackObject *LoadSceneAsync_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            libx.SceneAssetRequest @sceneAssetRequest = (libx.SceneAssetRequest) typeof(libx.SceneAssetRequest).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            ETModel.ResourcesAsyncComponent instance_of_this_method = (ETModel.ResourcesAsyncComponent) typeof(ETModel.ResourcesAsyncComponent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.LoadSceneAsync(@sceneAssetRequest);

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
Exemple #5
0
        static int _m_UnloadScene_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    libx.SceneAssetRequest _scene = (libx.SceneAssetRequest)translator.GetObject(L, 1, typeof(libx.SceneAssetRequest));

                    libx.Assets.UnloadScene(_scene);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemple #6
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
                {
                    string _path      = LuaAPI.lua_tostring(L, 2);
                    bool   _addictive = LuaAPI.lua_toboolean(L, 3);

                    libx.SceneAssetRequest gen_ret = new libx.SceneAssetRequest(_path, _addictive);
                    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 libx.SceneAssetRequest constructor!"));
        }
Exemple #7
0
        static int _m_LoadSceneAsync_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    string _path     = LuaAPI.lua_tostring(L, 1);
                    bool   _additive = LuaAPI.lua_toboolean(L, 2);

                    libx.SceneAssetRequest gen_ret = libx.Assets.LoadSceneAsync(_path, _additive);
                    translator.Push(L, gen_ret);



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