diff --git a/a8/luaengine.cc b/a8/luaengine.cc index c44297c..9d32610 100644 --- a/a8/luaengine.cc +++ b/a8/luaengine.cc @@ -29,6 +29,16 @@ namespace a8 } } + void LuaEngine::Init(const std::string& lua_path) + { + lua_path_ = lua_path; + } + + void LuaEngine::UnInit() + { + + } + bool LuaEngine::LoadModule(const std::string& module_name) { std::string real_filename = lua_path_ + module_name; diff --git a/a8/luaengine.h b/a8/luaengine.h index ae6e2d0..d41cc5b 100755 --- a/a8/luaengine.h +++ b/a8/luaengine.h @@ -11,6 +11,11 @@ namespace a8 LuaEngine(); ~LuaEngine(); + + void Init(const std::string& lua_path); + void UnInit(); + std::string GetErrorMsg() { return last_error_msg_; }; + lua_State* GetLuaState() { return lua_state_; }; bool LoadModule(const std::string& module_name); bool LoadString(const std::string& str); std::tuple CallGlobalFunc(const char* func_name, @@ -18,7 +23,6 @@ namespace a8 std::tuple CallModuleFunc(const char* module_name, const char* func_name, std::initializer_list args); - std::string GetErrorMsg() { return last_error_msg_; }; private: