Shorthands for exposing objects and functions to Lua.

This commit is contained in:
Simon Holmberg
2012-10-19 03:01:26 +02:00
parent 9f47ad9a57
commit d376031193
+10
View File
@@ -105,6 +105,16 @@ namespace DepthsBelow
");
}
public LuaInterface.LuaFunction Expose(string path, object target, System.Reflection.MethodBase function)
{
return lua.RegisterFunction(path, target, function);
}
public void Expose(string path, object obj)
{
lua[path] = obj;
}
public void ResetContext()
{
if (lua != null)