Ejemplo n.º 1
0
 public UserScriptRunner(CoreModules modules)
 {
     Lua = new Script(modules);
     Lua.Globals["RegisterHook"]      = (Action <DynValue, string>)RegisterHook;
     Lua.Globals["RegisterCoroutine"] = (Action <DynValue, string, bool>)RegisterCoroutine;
     Lua.Globals["RemoveHook"]        = (Action <string>)RemoveHook;
     GlobalScriptBindings.Initialize(Lua);
 }
Ejemplo n.º 2
0
 public UserScriptRunner()
 {
     Lua = new Script(CoreModules.Preset_HardSandbox | CoreModules.Coroutine | CoreModules.OS_Time);
     Lua.Globals["RegisterHook"]      = (Action <DynValue, string>)RegisterHook;
     Lua.Globals["RegisterCoroutine"] = (Action <DynValue, string, bool>)RegisterCoroutine;
     Lua.Globals["RemoveHook"]        = (Action <string>)RemoveHook;
     GlobalScriptBindings.Initialize(Lua);
 }