Ejemplo n.º 1
0
        static int _g_get_isDone(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                libx.SceneAssetAsyncRequest gen_to_be_invoked = (libx.SceneAssetAsyncRequest)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushboolean(L, gen_to_be_invoked.isDone);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
Ejemplo n.º 2
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.SceneAssetAsyncRequest gen_ret = new libx.SceneAssetAsyncRequest(_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.SceneAssetAsyncRequest constructor!"));
        }