Java 类com.badlogic.gdx.Files 实例源码

项目:FlappyChapa    文件:DesktopLauncher.java   
public static void main (String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = FlappyChapa.WIDTH;
    config.height = FlappyChapa.HEIGHT;
    config.title = FlappyChapa.TITLE;
    config.addIcon("icons/chapaicon.png", Files.FileType.Internal);
    config.addIcon("icons/chapaicon1.png", Files.FileType.Internal);
       config.addIcon("icons/chapaicon2.png", Files.FileType.Internal);
    new LwjglApplication(new FlappyChapa(), config);
}
项目:drc-sim-client    文件:DesktopLauncher.java   
public static void main (String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 1280;
    config.height = 720;
    config.title = Constants.NAME;
    config.backgroundFPS = 30;
    if (System.getProperties().getProperty("os.name").toLowerCase().contains("mac")) {
        config.addIcon("image/icon-512.png", Files.FileType.Internal);
        config.addIcon("image/icon-256.png", Files.FileType.Internal);
    }
    config.addIcon("image/icon-32.png", Files.FileType.Internal);
    config.addIcon("image/icon-16.png", Files.FileType.Internal);
    ArgumentParser argParser = new ArgumentParser(arg);
    Control[] controls = new Control[argParser.touchControl ? 3 : 2];
    controls[0] = new ControlKeyboard();
    controls[1] = new ControlController();
    if (argParser.touchControl)
        controls[2] = new ControlTouch();
    new LwjglApplication(new Client(controls, new Audio(), argParser), config);
}
项目:drc-sim-client    文件:DesktopLauncher.java   
public static void main (String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 1280;
    config.height = 720;
    config.title = Constants.NAME;
    config.backgroundFPS = 30;
    if (System.getProperties().getProperty("os.name").toLowerCase().contains("mac")) {
        config.addIcon("image/icon-512.png", Files.FileType.Internal);
        config.addIcon("image/icon-256.png", Files.FileType.Internal);
    }
    config.addIcon("image/icon-32.png", Files.FileType.Internal);
    config.addIcon("image/icon-16.png", Files.FileType.Internal);
    ArgumentParser argParser = new ArgumentParser(arg);
    Control[] controls = new Control[argParser.touchControl ? 3 : 2];
    controls[0] = new ControlKeyboard();
    controls[1] = new ControlController();
    if (argParser.touchControl)
        controls[2] = new ControlTouch();
    new LwjglApplication(new Client(controls, new Audio(), argParser), config);
}
项目:Inspiration    文件:DebugDesktopLauncher.java   
public static void main (String[] arg) {
        LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
        cfg.title = "Inspiration";
        cfg.useGL30 = false;
        cfg.width = 640;
        cfg.height = 480;
//      cfg.width = 800;
//      cfg.height = 600;
        // fullscreen
//      cfg.fullscreen = true;
        // vSync
//      cfg.vSyncEnabled = true;
        cfg.addIcon("icon.png", Files.FileType.Internal);
        Gdx.app  = new LwjglApplication(new Inspiration(), cfg);
        //Gdx.app.setLogLevel(Application.LOG_INFO);
        Gdx.app.setLogLevel(Application.LOG_DEBUG);
        //Gdx.app.setLogLevel(Application.LOG_ERROR);
        //Gdx.app.setLogLevel(Application.LOG_NONE);
    }
项目:Inspiration    文件:DesktopLauncher.java   
public static void main (String[] arg) {
        LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
        cfg.title = "Inspiration";
        cfg.useGL30 = false;
        cfg.width = 640;
        cfg.height = 480;
//      cfg.width = 800;
//      cfg.height = 600;
        // fullscreen
//      cfg.fullscreen = true;
        // vSync
//      cfg.vSyncEnabled = true;
        cfg.addIcon("icon.png", Files.FileType.Internal);
        Gdx.app  = new LwjglApplication(new Inspiration(), cfg);
        //Gdx.app.setLogLevel(Application.LOG_INFO);
//      Gdx.app.setLogLevel(Application.LOG_DEBUG);
        //Gdx.app.setLogLevel(Application.LOG_ERROR);
        //Gdx.app.setLogLevel(Application.LOG_NONE);
    }
项目:fabulae    文件:Configuration.java   
private Configuration(final Files files, final String moduleName) {
    if (configuration != null) {
        this.options = configuration.options;
    } else {
        loadOptions(files);
    }
    configuration = this;
    this.moduleName = moduleName;
    this.moduleFolder = FOLDER_MODULES + moduleName + "/";
    String file = moduleFolder + "config.xml";
    try {
        loadFromXML(files.internal(file));
        loadingScreensConfiguration = new LoadingScreens(files.internal(Configuration.getFolderUI()
                + "loadingScreens.xml"));
    } catch (final IOException e) {
        throw new GdxRuntimeException("Cannot read configuration file " + file + ", aborting.", e);
    }
}
项目:gdx-texture-packer-gui    文件:GLSurfaceLauncher.java   
public static void start(Arguments arguments) {
    LoggerUtils.setupExternalFileOutput();

    final LwjglApplicationConfiguration configuration = new LwjglApplicationConfiguration();
    configuration.title = AppConstants.APP_TITLE;
    configuration.addIcon("icon128.png", Files.FileType.Classpath);
    configuration.addIcon("icon32.png", Files.FileType.Classpath);
    configuration.addIcon("icon16.png", Files.FileType.Classpath);
    configuration.preferencesDirectory = AppConstants.EXTERNAL_DIR;
    configuration.width = 1024;
    configuration.height = 600;
    configuration.allowSoftwareMode = arguments.softOpenGL;

    AppParams appParams = new AppParams();
    appParams.startupProject = arguments.project;

    App app = new App(new DesktopClassScanner(), appParams);
    new LwjglApplication(new WindowParamsPersistingApplicationWrapper(app, configuration), configuration);
}
项目:CodeBase    文件:Main.java   
@Override
public void create() {
    CurrentResourceLocator.set(new GdxResourceLocator(Files.FileType.Local));
    DrawUtil.init();
    setupDummyLoader();
    loadAssetLists();
    setupGdx();
    SoundInstance.init();

    consoleSkin = new Skin(Gdx.files.internal("data/skins/basic.json"));
    consoleView.init(consoleSkin);
    addScreenListener(consoleView);
    inputMultiplexer.addProcessor(consoleView.getInputProcessor());
    inputMultiplexer.addProcessor(HotkeyManager.getInputProcessor());

    changeState(new LoadGameState(assetManager, this::onLoadComplete), null, null);

    this.console.register(distanceModel);
    distanceModel.addListener((CVar) -> distanceModel.get().activate());

    this.console.register(emitterMode);
    emitterMode.addListener(this::onEmitterModeChanged);
}
项目:libgdxcn    文件:PixmapBlendingTest.java   
@Override
public void create () {
    if (spriteBatch != null) return;
    spriteBatch = new SpriteBatch();

    Matrix4 transform = new Matrix4();
    transform.setToTranslation(0, Gdx.graphics.getHeight(), 0);
    transform.mul(new Matrix4().setToScaling(1, -1, 1));
    spriteBatch.setTransformMatrix(transform);

    pixS1 = new Pixmap(Gdx.files.getFileHandle("data/test4.png", Files.FileType.Internal));
    pixS2 = new Pixmap(Gdx.files.getFileHandle("data/test3.png", Files.FileType.Internal));
    pixD = new Pixmap(64, 128, Pixmap.Format.RGBA8888);

    pixD.drawPixmap(pixS1, 0, 0, 0, 0, 76, 76);
    pixD.drawPixmap(pixS2, 0, 0, 0, 0, 76, 76);

    logoSprite = new Sprite(new Texture(pixD));
    logoSprite.flip(false, true);

    pixS1.dispose();
    pixS2.dispose();
    pixD.dispose();
}
项目:TinyVoxel    文件:DesktopLauncher.java   
public static void main (String[] arg) {
        LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
                config.title = "Tiny Voxel";
                config.width = 1280;
                config.height = 720;
                config.useGL30 = false;
//                config.vSyncEnabled = true;
                config.vSyncEnabled = false;
                config.foregroundFPS = 0; // Setting to 0 disables foreground fps throttling
                config.backgroundFPS = 0; // Setting to 0 disables background fps throttling
                config.stencil = 0;
                //cfg.fullscreen = true;
                config.addIcon("textures/icon.png", Files.FileType.Internal);

        Config.set(new DesktopConfig());
        new LwjglApplication(new Game(new KeyBoardController()), config);
    }
项目:ead    文件:MokapController.java   
@Override
protected ApplicationAssets createApplicationAssets(Files files) {
    // 48px are 0.8cm in scale 1.0
    float scale = (Gdx.graphics.getPpcX() * 0.8f) / 48.0f;
    String scaleString;
    if (scale < Float.parseFloat(SCALES[0])) {
        scaleString = SCALES[0];
    } else {
        scaleString = SCALES[SCALES.length - 1];
        for (int i = 0; i < SCALES.length - 1; i++) {
            float lowerScale = Float.parseFloat(SCALES[i]);
            float greaterScale = Float.parseFloat(SCALES[i + 1]);
            if (scale >= lowerScale && scale <= greaterScale) {
                scaleString = scale - lowerScale < greaterScale - scale ? SCALES[i]
                        : SCALES[i + 1];
                break;
            }
        }
    }
    return new ApplicationAssets(files, "skins/mokap/skin.json",
            scaleString);
}
项目:ingress-indonesia-dev    文件:TextureDict.java   
public static TextureRef loadTexture(String paramString, Texture.TextureFilter paramTextureFilter1, Texture.TextureFilter paramTextureFilter2, Texture.TextureWrap paramTextureWrap1, Texture.TextureWrap paramTextureWrap2)
{
  if (sDictionary.containsKey(paramString))
  {
    TextureRef localTextureRef2 = (TextureRef)sDictionary.get(paramString);
    localTextureRef2.addRef();
    return localTextureRef2;
  }
  FileHandle localFileHandle = Gdx.app.getFiles().getFileHandle(paramString, Files.FileType.Internal);
  if ((paramTextureFilter1.isMipMap()) || (paramTextureFilter2.isMipMap()));
  for (boolean bool = true; ; bool = false)
  {
    Texture localTexture = new Texture(localFileHandle, bool);
    localTexture.setFilter(paramTextureFilter1, paramTextureFilter2);
    localTexture.setWrap(paramTextureWrap1, paramTextureWrap2);
    TextureRef localTextureRef1 = new TextureRef(paramString, localTexture);
    sDictionary.put(paramString, localTextureRef1);
    return localTextureRef1;
  }
}
项目:ingress-indonesia-dev    文件:FileHandle.java   
public FileHandle[] list()
{
  int i = 0;
  if (this.type == Files.FileType.Classpath)
    throw new GdxRuntimeException("Cannot list a classpath directory: " + this.file);
  String[] arrayOfString = file().list();
  FileHandle[] arrayOfFileHandle;
  if (arrayOfString == null)
    arrayOfFileHandle = new FileHandle[0];
  while (true)
  {
    return arrayOfFileHandle;
    arrayOfFileHandle = new FileHandle[arrayOfString.length];
    int j = arrayOfString.length;
    while (i < j)
    {
      arrayOfFileHandle[i] = child(arrayOfString[i]);
      i++;
    }
  }
}
项目:ingress-indonesia-dev    文件:FileHandle.java   
public InputStream read()
{
  Object localObject;
  if ((this.type == Files.FileType.Classpath) || ((this.type == Files.FileType.Internal) && (!this.file.exists())) || ((this.type == Files.FileType.Local) && (!this.file.exists())))
  {
    localObject = FileHandle.class.getResourceAsStream("/" + this.file.getPath().replace('\\', '/'));
    if (localObject != null)
      break label146;
    throw new GdxRuntimeException("File not found: " + this.file + " (" + this.type + ")");
  }
  try
  {
    localObject = new FileInputStream(file());
    label146: return localObject;
  }
  catch (Exception localException)
  {
    if (file().isDirectory())
      throw new GdxRuntimeException("Cannot open a stream to a directory: " + this.file + " (" + this.type + ")", localException);
    throw new GdxRuntimeException("Error reading file: " + this.file + " (" + this.type + ")", localException);
  }
}
项目:ingress-indonesia-dev    文件:FileHandle.java   
public OutputStream write(boolean paramBoolean)
{
  if (this.type == Files.FileType.Classpath)
    throw new GdxRuntimeException("Cannot write to a classpath file: " + this.file);
  if (this.type == Files.FileType.Internal)
    throw new GdxRuntimeException("Cannot write to an internal file: " + this.file);
  parent().mkdirs();
  try
  {
    FileOutputStream localFileOutputStream = new FileOutputStream(file(), paramBoolean);
    return localFileOutputStream;
  }
  catch (Exception localException)
  {
    if (file().isDirectory())
      throw new GdxRuntimeException("Cannot open a stream to a directory: " + this.file + " (" + this.type + ")", localException);
    throw new GdxRuntimeException("Error writing file: " + this.file + " (" + this.type + ")", localException);
  }
}
项目:ingress-indonesia-dev    文件:FileHandle.java   
public Writer writer(boolean paramBoolean, String paramString)
{
  if (this.type == Files.FileType.Classpath)
    throw new GdxRuntimeException("Cannot write to a classpath file: " + this.file);
  if (this.type == Files.FileType.Internal)
    throw new GdxRuntimeException("Cannot write to an internal file: " + this.file);
  parent().mkdirs();
  try
  {
    FileOutputStream localFileOutputStream = new FileOutputStream(file(), paramBoolean);
    if (paramString == null)
      return new OutputStreamWriter(localFileOutputStream);
    OutputStreamWriter localOutputStreamWriter = new OutputStreamWriter(localFileOutputStream, paramString);
    return localOutputStreamWriter;
  }
  catch (IOException localIOException)
  {
    if (file().isDirectory())
      throw new GdxRuntimeException("Cannot open a stream to a directory: " + this.file + " (" + this.type + ")", localIOException);
    throw new GdxRuntimeException("Error writing file: " + this.file + " (" + this.type + ")", localIOException);
  }
}
项目:LD38-Compo    文件:DesktopLauncher.java   
public static void main (String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 800;
    config.height = 800;
    config.resizable = false;
    config.title = "HexCity";
    config.addIcon("icons/icon-128.png", Files.FileType.Internal);
    config.addIcon("icons/icon-32.png", Files.FileType.Internal);
    config.addIcon("icons/icon-16.png", Files.FileType.Internal);
    new LwjglApplication(new LudumDare38(), config);
}
项目:ShootMe    文件:DesktopLauncher.java   
public static void main (String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.title = "ShootMe";
    config.width = 1280;
    config.height = 720;
    config.addIcon("assets/guenter_icon32px.png", Files.FileType.Internal);
       config.addIcon("assets/guenter_icon16px.png", Files.FileType.Internal);
       config.resizable = false;
    new LwjglApplication(new ShootMeGame(), config);
}
项目:ggvm    文件:DesktopLauncher.java   
public static void main (String[] arg) {
    //Initialize log file
       try {
           File file = new File("log.txt");
           if (file.exists()) {
               file.delete();
           }
           PrintStream printStream = new PrintStream(file);
           System.setOut(printStream);
           System.setErr(printStream);
       } catch (FileNotFoundException fileNotFoundException) {
           System.out.println("Could not create log file.");
       }
       //Initialize application
       Graphics.DisplayMode selectedDisplayMode = LwjglApplicationConfiguration.getDesktopDisplayMode();
       if (selectedDisplayMode != null) {
           GameModule gameModule = GameModuleProvider.provideGameModule();
           LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
           config.setFromDisplayMode(selectedDisplayMode);
           config.vSyncEnabled = true;
           if (gameModule.provideIconFileName() != null) {
               config.addIcon(gameModule.provideIconFileName(), Files.FileType.Internal);
           }
           new LwjglApplication(new GGVmApplication(gameModule, PCMenu.class, KeyboardInputProcessor.class), config);
       } else {
           System.out.println("Sorry, this game requires a graphics card that can display 32 bpp!");
       }
}
项目:conquest    文件:DesktopLauncher.java   
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();

    config.addIcon("icons/conquest-128.png", Files.FileType.Internal);
    config.addIcon("icons/conquest-32.png", Files.FileType.Internal);
    config.addIcon("icons/conquest-16.png", Files.FileType.Internal);

    config.resizable = false;
    config.width = 1280;
    config.height = 720;

    new LwjglApplication(new Conquest(), config);
}
项目:Klooni1010    文件:DesktopLauncher.java   
public static void main (String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.title = "Klooni 1010!";
    config.width = Klooni.GAME_WIDTH;
    config.height = Klooni.GAME_HEIGHT;
    config.addIcon("ic_launcher/icon128.png", Files.FileType.Internal);
    config.addIcon("ic_launcher/icon32.png", Files.FileType.Internal);
    config.addIcon("ic_launcher/icon16.png", Files.FileType.Internal);
    new LwjglApplication(new Klooni(null), config);
}
项目:cascadian-order-office-roguelike    文件:DesktopLauncher.java   
public static void main (String[] args) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
        config.width = 80 * 11;
    config.height = (24 + 8) * 22;
    config.addIcon("Tentacle-16.png", Files.FileType.Internal);
    config.addIcon("Tentacle-32.png", Files.FileType.Internal);
    config.addIcon("Tentacle-128.png", Files.FileType.Internal);
config.title = "Awfice";
    new LwjglApplication(new MySquidGame(), config);
  }
项目:ExamensArbeteTD    文件:DesktopLauncher.java   
public static void main (String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 960;
    config.height = 720;
    config.addIcon("interface/icons/turret-icon.png", Files.FileType.Internal);
    config.title = Game.TITLE;
    config.fullscreen = Game.isFullscreen;
    new LwjglApplication(new Game(), config);
}
项目:PixelDungeonTC    文件:DesktopLauncher.java   
public static void main (String[] arg) {
    String version = DesktopLauncher.class.getPackage().getSpecificationVersion();
    if (version == null) {
        version = "1.0";
    }
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();

    if (SharedLibraryLoader.isMac) {
        config.preferencesDirectory = "Library/Application Support/Pixel Dungeon/";
    } else if (SharedLibraryLoader.isLinux) {
        config.preferencesDirectory = ".watabou/pixel-dungeon/";
    } else if (SharedLibraryLoader.isWindows) {
        config.preferencesDirectory = "Saved Games/Pixel Dungeon/";
    }
    // FIXME: This is a hack to get access to the preferences before we have an application setup
    com.badlogic.gdx.Preferences prefs = new LwjglPreferences(Preferences.FILE_NAME, config.preferencesDirectory);

    boolean isFullscreen = prefs.getBoolean(Preferences.KEY_WINDOW_FULLSCREEN, false);
    config.fullscreen = isFullscreen;
    if (!isFullscreen) {
        config.width = prefs.getInteger(Preferences.KEY_WINDOW_WIDTH, Preferences.DEFAULT_WINDOW_WIDTH);
        config.height = prefs.getInteger(Preferences.KEY_WINDOW_HEIGHT, Preferences.DEFAULT_WINDOW_HEIGHT);
    }

    config.addIcon( "ic_launcher_128.png", Files.FileType.Internal );
    config.addIcon( "ic_launcher_32.png", Files.FileType.Internal );
    config.addIcon( "ic_launcher_16.png", Files.FileType.Internal );

    // TODO: It have to be pulled from build.gradle, but I don't know how it can be done
    config.title = "Pixel Dungeon";

    new LwjglApplication(new PixelDungeon(
            new DesktopSupport(version, config.preferencesDirectory, new DesktopInputProcessor())
    ), config);
}
项目:ZombieInvadersVR    文件:AssetRepository.java   
private synchronized <T> T loadAsset(String url, Class<T> clazz) {
    T asset = null;

    if(clazz == Model.class)
        asset = (T) modelLoader.loadModel(Gdx.files.getFileHandle(url, Files.FileType.Internal));
    if(clazz == Texture.class)
        asset = (T) new Texture(Gdx.files.getFileHandle(url, Files.FileType.Internal));

    return asset;
}
项目:Space-Bombs    文件:DesktopLauncher.java   
public static void main (String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
               config.width = Constants.SCREENWIDTH;
               config.height = Constants.SCREENHEIGHT;
               config.fullscreen = Constants.DEFAULTFULLSCREEN;
               config.title = Constants.WINDOWTITEL;
               config.addIcon(Constants.WINDOWICONPATH, Files.FileType.Internal);

           new LwjglApplication(new Main(), config);
}
项目:pixelhorrorjam2016    文件:DesktopLauncher.java   
public static void main (String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();

    config.foregroundFPS = 60;
    config.vSyncEnabled = true;

    config.width = 800;
    config.height = 450;
    config.addIcon("icons/large.png", Files.FileType.Internal);
    config.addIcon("icons/med.png", Files.FileType.Internal);
    config.addIcon("icons/small.png", Files.FileType.Internal);

    new LwjglApplication(new MainGame(), config);
}
项目:anathema-roguelike    文件:SparseDemo.java   
public static void main (String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.title = "SquidLib GDX Sparse Demo";
    config.width = gridWidth * cellWidth;
    config.height = (gridHeight + bonusHeight) * cellHeight;
    config.vSyncEnabled = false;
    config.foregroundFPS = 0;
    config.backgroundFPS = 30;
    config.addIcon("Tentacle-16.png", Files.FileType.Classpath);
    config.addIcon("Tentacle-32.png", Files.FileType.Classpath);
    config.addIcon("Tentacle-128.png", Files.FileType.Classpath);
    new LwjglApplication(new SparseDemo(), config);
}
项目:skin-composer    文件:MainListener.java   
public void saveFile(Runnable runnable) {
    if (projectData.getSaveFile() != null && projectData.getSaveFile().type() != Files.FileType.Local) {

        dialogFactory.showDialogLoading(() -> {
            projectData.save();
            if (runnable != null) {
                runnable.run();
            }
        });
    } else {
        saveAsFile(runnable);
    }
}
项目:Teleport-Ball    文件:DesktopLauncher.java   
public static void main (String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.title = "Teleport Ball";
    config.width = 480;
    config.height = 800;
    config.resizable = true;
    config.addIcon("desktop-icons/ic_launcher.png", Files.FileType.Internal);
    config.addIcon("desktop-icons/ic_launcher16x16.png", Files.FileType.Internal);
    new LwjglApplication(new Application(null), config);
}
项目:GDefence    文件:DesktopLauncher.java   
public static void main (String[] arg) {
        System.setProperty("user.name", "\\xD0\\x90\\xD0\\xBD\\xD0\\xB4\\xD1\\x80\\xD0\\xB5\\xD0\\xB9");//Comment if user.name on english
        LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
        System.setProperty("org.lwjgl.opengl.Display.allowSoftwareOpenGL", "true");
        config.title = "GDefence";
        config.width = 1280;
        config.height = 720;
//        config.fullscreen = true;
        config.addIcon("Logo/logo16.png", Files.FileType.Internal);
        config.addIcon("Logo/logo32.png", Files.FileType.Internal);
        new LwjglApplication(new GDefence(), config);
    }
项目:cachebox3.0    文件:IOS_Launcher.java   
@Override
protected IOSApplication createApplication() {

    CB.setGlobalScale(1);

    final String appDir = System.getenv("HOME");
    final String localPath = appDir + "/Library/local/";

    LibgdxLogger.PROPERTIES_FILE_HANDLE = new LibgdxLoggerIosFileHandle(localPath, Files.FileType.Absolute).child(LibgdxLogger.CONFIGURATION_FILE_XML);
    LibgdxLogger.initial(LibgdxLogger.PROPERTIES_FILE_HANDLE);


    //initialize platform bitmap factory
    IosGraphics.init();


    //initialize platform connector
    PlatformConnector.init(new IOS_PlatformConnector(this));
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    config.multisample = GLKViewDrawableMultisample._4X;
    config.orientationLandscape = false;
    config.orientationPortrait = true;
    config.stencilFormat = GLKViewDrawableStencilFormat._8;
    GdxAssets.init("assets/");
    GLAdapter.init(new IosGL());

    return new IOSApplication(new CacheboxMain(), config);
}
项目:dice-heroes    文件:Generator.java   
private static void renamePrefixes(String path, String prefix, String newPrefix) {
    Files files = new LwjglFiles();
    for (FileHandle fileHandle : files.local(path).list()) {
        if (fileHandle.name().startsWith(prefix)) {
            String newName = newPrefix + fileHandle.name().substring(prefix.length());
            println(fileHandle.name() + " -> " + newName);
            fileHandle.sibling(newName).write(fileHandle.read(), false);
            fileHandle.delete();
        }
    }
}
项目:fabulae    文件:Configuration.java   
private void loadOptions(Files files) {
    String file = FOLDER_USER_DATA + "config.xml";
    try {
        FileHandle userOptions = files.local(file);
        options = userOptions.exists() ? new GameOptions(userOptions) : new GameOptions();
    } catch (final IOException e) {
        throw new GdxRuntimeException("Cannot read configuration file " + file + ", aborting.", e);
    }
}
项目:fabulae    文件:Configuration.java   
public static void writeOptions(Files files) {
    if (configuration == null || configuration.options == null) {
        return;
    }
    String file = FOLDER_USER_DATA + "config.xml";
    FileHandle userOptions = files.local(file);
    OutputStream outputStream = userOptions.write(false);
    Writer writer = new OutputStreamWriter(outputStream, Charset.forName("UTF-8"));
    try {
        writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
        XmlWriter xml = new XmlWriter(writer);
        xml.element("gameOptions");
        XMLUtil.writePrimitives(configuration.options, xml, true);
        xml.element(XML_KEY_BINDINGS);
        for (KeyBindings binding : KeyBindings.values()) {
            xml.element(binding.name().toLowerCase(Locale.ENGLISH));
            xml.text(binding.getKeys().toString(","));
            xml.pop();
        }
        xml.pop();
        xml.pop();
        xml.flush();
    } catch (final IOException e) {
        throw new GdxRuntimeException("Cannot write configuration file " + file + ", aborting.", e);
    } finally {
        StreamUtils.closeQuietly(writer);
    }
}
项目:throw-the-moon    文件:DesktopLauncher.java   
public static void main (String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width=1280;
    config.height=720;
    config.vSyncEnabled=true;
    config.resizable = false;
    config.addIcon("icon.png", Files.FileType.Internal);
    new LwjglApplication(new ThrowTheMoonGame(true), config);
}
项目:tox    文件:DesktopLauncher.java   
public static void main (String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
       config.title = "Tox";
       config.width = 480;
       config.height = 800;
       config.resizable=false;
       config.foregroundFPS = 30;
       config.addIcon("icon128x128.png", Files.FileType.Internal);
       config.addIcon("icon32x32.png", Files.FileType.Internal);
       config.addIcon("icon16x16.png", Files.FileType.Internal);
    new LwjglApplication(new ToxGame(), config);
}
项目:SpaceShooter    文件:DesktopLauncher.java   
public static void main(String[] args) {

        LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
        StartupOptions startupOptions = new StartupOptions();

        new JCommander(startupOptions, args);

        if (startupOptions.dedicatedServer) {
            try {
                new SpaceShooter(startupOptions);
                new Server(startupOptions).start();
            } catch (Exception e) {
                e.printStackTrace();
            }
            return;
        }

        config.title = "South River Space Shooter";
        //TODO: Fix the auto Resolution Generator for Dual Monitor Support.
        config.height = startupOptions.debug ? 6 * 100 : Toolkit.getDefaultToolkit().getScreenSize().height;
        config.width = startupOptions.debug ? 11 * 100 : Toolkit.getDefaultToolkit().getScreenSize().width;
        config.fullscreen = !startupOptions.debug;
        config.resizable = startupOptions.debug;
        config.vSyncEnabled = true;
        config.useHDPI = true;
        config.allowSoftwareMode = true;

        config.addIcon("splash/favicon-blue.png", Files.FileType.Internal);

        new LwjglApplication(new SpaceShooter(startupOptions), config);
    }
项目:Aftamath    文件:AftamathDesktop.java   
public static void main(String[] args) {
        LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration(); //Configuration file in LibGDX used to start the game
        cfg.title = Game.TITLE; //Sets the title of the game
        cfg.width = Game.width; //Sets the width of the game screen
        cfg.height = Game.height; //Sets the height of the game screen
//      cfg.resizable = false; // Allows the game screen to be resizable
        cfg.vSyncEnabled = true; // vSync makes frames load better
//      cfg.useGL20 = true;  
//      cfg.fullscreen = true; // Forces the game screen into fullscreen
        Game.fullscreen = cfg.fullscreen;
        cfg.addIcon("assets/images/Icon.png", Files.FileType.Internal); 

        new LwjglApplication(new Game(), cfg); //Creates and launches the game file using the previous settings
    }
项目:GladiatorBrawler    文件:DesktopLauncher.java   
public static void main(String[] args) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.title = Name.GAME_NAME;
    config.width = 1280;
    config.height = 720;
    config.vSyncEnabled = true; // Change this to false for performance testing
    config.foregroundFPS = 0;
    config.addIcon("sprites/icon_16.png", Files.FileType.Internal);
    config.addIcon("sprites/icon_32.png", Files.FileType.Internal);
    config.addIcon("sprites/icon_128.png", Files.FileType.Internal);
    LwjglApplication app = new LwjglApplication(new GladiatorBrawler(), config);
}