|
|
@@ -1,13 +1,5 @@
|
|
|
$#include "LuaScript.h"
|
|
|
|
|
|
-class LuaScript
|
|
|
-{
|
|
|
- void SetExecuteConsoleCommands(bool enable);
|
|
|
- bool GetExecuteConsoleCommands();
|
|
|
-
|
|
|
- tolua_property__get_set bool executeConsoleCommands;
|
|
|
-}
|
|
|
-
|
|
|
void LuaScriptSendEvent @ SendEvent(const String eventName, VariantMap& eventData);
|
|
|
void LuaScriptSubscribeToEvent @ SubscribeToEvent(const String eventName, const String functionName);
|
|
|
void LuaScriptUnsubscribeFromEvent @ UnsubscribeFromEvent(const String eventName, const String functionName = String::EMPTY);
|
|
|
@@ -16,19 +8,10 @@ void LuaScriptSubscribeToEvent @ SubscribeToEvent(void* sender, const String eve
|
|
|
void LuaScriptUnsubscribeFromEvent @ UnsubscribeFromEvent(void* sender, const String eventName, const String functionName = String::EMPTY);
|
|
|
void LuaScriptUnsubscribeFromEvents @ UnsubscribeFromEvents(void* sender);
|
|
|
|
|
|
-LuaScript* GetLuaScript();
|
|
|
-tolua_readonly tolua_property__get_set LuaScript* luaScript;
|
|
|
+void LuaScriptSetExecuteConsoleCommands @ SetExecuteConsoleCommands(bool enable);
|
|
|
+bool LuaScriptGetExecuteConsoleCommands @ GetExecuteConsoleCommands();
|
|
|
|
|
|
${
|
|
|
-#define TOLUA_DISABLE_tolua_LuaScriptLuaAPI_GetLuaScript00
|
|
|
-static int tolua_LuaScriptLuaAPI_GetLuaScript00(lua_State* tolua_S)
|
|
|
-{
|
|
|
- return ToluaGetSubsystem<LuaScript>(tolua_S);
|
|
|
-}
|
|
|
-
|
|
|
-#define TOLUA_DISABLE_tolua_get_luaScript_ptr
|
|
|
-#define tolua_get_luaScript_ptr tolua_LuaScriptLuaAPI_GetLuaScript00
|
|
|
-
|
|
|
static LuaScript* GetLuaScript(lua_State* L)
|
|
|
{
|
|
|
return GetContext(L)->GetSubsystem<LuaScript>();
|
|
|
@@ -39,4 +22,7 @@ static LuaScript* GetLuaScript(lua_State* L)
|
|
|
#define LuaScriptUnsubscribeFromEvent GetLuaScript(tolua_S)->ScriptUnsubscribeFromEvent
|
|
|
#define LuaScriptUnsubscribeFromAllEvents GetLuaScript(tolua_S)->ScriptUnsubscribeFromAllEvents
|
|
|
#define LuaScriptUnsubscribeFromEvents GetLuaScript(tolua_S)->ScriptUnsubscribeFromEvents
|
|
|
+
|
|
|
+#define LuaScriptSetExecuteConsoleCommands GetLuaScript(tolua_S)->SetExecuteConsoleCommands
|
|
|
+#define LuaScriptGetExecuteConsoleCommands GetLuaScript(tolua_S)->GetExecuteConsoleCommands
|
|
|
$}
|