Пример #1
0
 protected void RegisterLogFunction()
 {
     BBLua.lua_pushstring(this.ls.L, "LuaDebugger");
     BBLua.lua_newtable(this.ls.L);
     BBLua.lua_pushstring(this.ls.L, "Log");
     BBLua.lua_pushcclosure(this.ls.L, Marshal.GetFunctionPointerForDelegate(this.logCallback), 0);
     BBLua.lua_rawset(this.ls.L, -3);
     BBLua.lua_rawset(this.ls.L, (int)LuaPseudoIndices.GLOBALSINDEX);
 }
Пример #2
0
 public static void lua_setglobal(UIntPtr L, string name)
 {
     BBLua.lua_pushstring(L, name);
     BBLua.lua_insert(L, -2);
     BBLua.lua_rawset(L, (int)LuaPseudoIndices.GLOBALSINDEX);
 }