org.luaj.vm2.Globals.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中org.luaj.vm2.Globals.<init>()方法的一些代码示例,展示了Globals.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Globals.<init>()方法的具体详情如下:
包路径:org.luaj.vm2.Globals
类名称:Globals
方法名:<init>

Globals.<init>介绍

暂无

代码示例

代码示例来源:origin: mirkosertic/GameComposer

private Globals createGlobals(KeyValueObjectCache aObjectCache) {
    Globals theGlobals = new Globals();
//         globals.load(new BaseLib());
//        globals.load(new PackageLib());
//        globals.load(new Bit32Lib());
//        globals.load(new OsLib());
//        globals.load(new MathLib());
//        globals.load(new TableLib());
//        globals.load(new StringLib());
//        globals.load(new CoroutineLib());
//        globals.load(new JmeIoLib());
//        LoadState.install(globals);
    LuaC.install(theGlobals);

    LuaJScriptEngine.registerTo(theGlobals, buildInFunctions, aObjectCache);

    return theGlobals;
  }

代码示例来源:origin: org.mini2Dx/miniscript-lua

sandboxedGlobals = new Globals();
sandboxedGlobals.load(new JseBaseLib());
sandboxedGlobals.load(new PackageLib());

代码示例来源:origin: org.mini2Dx/miniscript-lua

private Globals createSandboxedGlobals() {
    Globals result = new Globals();
    result.load(new JseBaseLib());
    result.load(new PackageLib());
    result.load(new Bit32Lib());
    result.load(new TableLib());
    result.load(new StringLib());
    result.load(new JseMathLib());
    result.load(new DebugLib());
    result.set("debug", LuaValue.NIL);
    return result;
  }
}

代码示例来源:origin: hsllany/HtmlNative

/**
 * Create a standard set of globals for JSE including all the libraries.
 *
 * @return Table of globals initialized with the standard JSE libraries
 * @see #debugGlobals()
 * @see org.luaj.vm2.lib.jse.JsePlatform
 * @see org.luaj.vm2.lib.jme.JmePlatform
 */
public static Globals standardGlobals() {
  Globals globals = new Globals();
  globals.load(new JseBaseLib());
  globals.load(new PackageLib());
  globals.load(new Bit32Lib());
  globals.load(new TableLib());
  globals.load(new StringLib());
  globals.load(new JseMathLib());
  globals.load(new JseOsLib());
  LoadState.install(globals);
  LuaC.install(globals);
  return globals;
}

代码示例来源:origin: Tencent/RapidView

private Globals createLimitGlobals(){
  Globals globals = new Globals();
  globals.load(new JseBaseLib());
  globals.load(new PackageLib());
  globals.load(new Bit32Lib());
  globals.load(new TableLib());
  globals.load(new StringLib());
  globals.load(new CoroutineLib());
  globals.load(new JseMathLib());
  globals.load(new JseOsLib());
  globals.load(new LuajavaLib(RapidLuaLimitPath.msLimitArray, null));
  LoadState.install(globals);
  LuaC.install(globals);
  return globals;
}

代码示例来源:origin: M66B/XPrivacyLua

/**
 * Create a standard set of globals for JSE including all the libraries.
 * 
 * @return Table of globals initialized with the standard JSE libraries
 * @see #debugGlobals()
 * @see org.luaj.vm2.lib.jse.JsePlatform
 * @see org.luaj.vm2.lib.jme.JmePlatform
 */
public static Globals standardGlobals() {
  Globals globals = new Globals();
  globals.load(new JseBaseLib());
  globals.load(new PackageLib());
  globals.load(new Bit32Lib());
  globals.load(new TableLib());
  globals.load(new StringLib());
  globals.load(new CoroutineLib());
  globals.load(new JseMathLib());
  globals.load(new JseIoLib());
  globals.load(new JseOsLib());
  globals.load(new LuajavaLib());
  LoadState.install(globals);
  LuaC.install(globals);
  return globals;		
}

相关文章