Java 类com.badlogic.gdx.assets.loaders.resolvers.LocalFileHandleResolver 实例源码

项目:bobbybird    文件:Core.java   
public void initManagers() {
    assetManager = new AssetManager(new LocalFileHandleResolver(), true);

    imagePacks = new ObjectMap<String, Array<String>>();
    for (String name : new String[] {"characters", "obstacles", "grounds", "clouds", "bushes", "buildings"}) {
        imagePacks.put(DATA_PATH + "/" + name, new Array<String>());
    }

    stateManager = new StateManager(this);
    stateManager.addState("loading", new LoadingState("menu", this));
    stateManager.addState("menu", new MenuState(this));
    stateManager.addState("game", new GameState(this));
    stateManager.addState("credits", new CreditsState(this));

    spriteBatch = new SpriteBatch();

    pixmapPacker = new PixmapPacker(1024, 1024, Pixmap.Format.RGBA8888, 5, true, new PixmapPacker.GuillotineStrategy());
}
项目:Inspiration    文件:GdxFileSystem.java   
@Override
public FileHandleResolver newResolver (FileType fileType) {
    switch (fileType) {
    case Absolute:
        return new AbsoluteFileHandleResolver();
    case Classpath:
        return new ClasspathFileHandleResolver();
    case External:
        return new ExternalFileHandleResolver();
    case Internal:
        return new InternalFileHandleResolver();
    case Local:
        return new LocalFileHandleResolver();
    }
    return null; // Should never happen
}
项目:gdx-ai    文件:GdxFileSystem.java   
@Override
public FileHandleResolver newResolver (FileType fileType) {
    switch (fileType) {
    case Absolute:
        return new AbsoluteFileHandleResolver();
    case Classpath:
        return new ClasspathFileHandleResolver();
    case External:
        return new ExternalFileHandleResolver();
    case Internal:
        return new InternalFileHandleResolver();
    case Local:
        return new LocalFileHandleResolver();
    }
    return null; // Should never happen
}
项目:libgdx-shaders    文件:ShaderLoaderTest.java   
@Test
public void testShaderLoading() {
    final LocalFileHandleResolver localFileHandleResolver = new LocalFileHandleResolver();
    final AssetManager assetManager = new AssetManager(localFileHandleResolver);

    assetManager.setLoader(ShaderProgram.class, new ShaderLoader(localFileHandleResolver));

    assetManager.load("default.vert+default.frag", ShaderProgram.class);
    assetManager.finishLoading();

    final ShaderProgram program = assetManager.get("default.vert+default.frag", ShaderProgram.class);
    Assert.assertNotNull(program);

    assetManager.unload("default.vert+default.frag");
}
项目:libgdx-shaders    文件:ShaderManager.java   
public ShaderManager(AssetManager assetManager) {
    this(assetManager, new ShaderLoader(new LocalFileHandleResolver()));
}