diff options
Diffstat (limited to 'Runtime/Lua')
-rw-r--r-- | Runtime/Lua/LuaHelper.cpp | 5 | ||||
-rw-r--r-- | Runtime/Lua/LuaHelper.h | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/Runtime/Lua/LuaHelper.cpp b/Runtime/Lua/LuaHelper.cpp index 2044ba2..9381b6c 100644 --- a/Runtime/Lua/LuaHelper.cpp +++ b/Runtime/Lua/LuaHelper.cpp @@ -59,4 +59,9 @@ bool LuaHelper::IsType(LuaBind::State& state, const char* typeName, int idx) bool bIsType = tname == typeName;
state.SetTop(top);
return bIsType;
+}
+
+bool LuaHelper::InstantiateClass(LuaBind::State& state, const char* classFullName)
+{
+ return false;
}
\ No newline at end of file diff --git a/Runtime/Lua/LuaHelper.h b/Runtime/Lua/LuaHelper.h index 56dae54..c3cd70e 100644 --- a/Runtime/Lua/LuaHelper.h +++ b/Runtime/Lua/LuaHelper.h @@ -5,13 +5,14 @@ // lua 5.1 doc: https://www.lua.org/manual/5.1/
+// 针对GameLab做一些扩展
class LuaHelper
{
public:
static int Call(const char* func, const char* params, ...);
-
static bool IsType(LuaBind::State& state, const char* typeName, int idx);
-
static void OnRegisterNativeClass(LuaBind::State& state, int cls, std::string clsName, std::string pkgName);
-
+ // 创建lua类的实例并留在栈顶,如果失败返回false且不压栈
+ static bool InstantiateClass(LuaBind::State& state, const char* classFullName);
+
};
\ No newline at end of file |