| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- $#define TOLUA_RELEASE
- $#include "LuaScript.h"
- void ExecuteFile(const String& fileName);
- void ExecuteFile(const char* fileName);
- Object* GetEventSender();
- void SendEvent(const String& eventName, VariantMap& eventData);
- void SendEvent(const char* eventName, VariantMap& eventData);
- void SubscribeToEvent(const String& eventName, const char* functionName);
- void SubscribeToEvent(const char* eventName, const char* functionName);
- void SubscribeToEvent(void* object, const String& eventName, const char* functionName);
- void SubscribeToEvent(void* object, const char* eventName, const char* functionName);
- $using namespace Urho3D;
- $#pragma warning(disable:4800)
- ${
- static LuaScript* GetLuaScript()
- {
- return GetContext()->GetSubsystem<LuaScript>();
- }
- static bool ExecuteFile(const String& fileName)
- {
- return GetLuaScript()->ExecuteFile(fileName);
- }
- static void SendEvent(const String& eventName, VariantMap& eventData)
- {
- GetLuaScript()->ScriptSendEvent(eventName, eventData);
- }
- static Object* GetEventSender()
- {
- return GetLuaScript()->GetEventSender();
- }
- static void SubscribeToEvent(const String& eventName, const char* functionName)
- {
- GetLuaScript()->ScriptSubscribeToEvent(eventName, functionName);
- }
- static void SubscribeToEvent(void* object, const String& eventName, const char* functionName)
- {
- GetLuaScript()->ScriptSubscribeToEvent((Object*)object, eventName, functionName);
- }
- $}
|