com.badlogic.gdx.assets.loaders.FileHandleResolver Java Examples
The following examples show how to use
com.badlogic.gdx.assets.loaders.FileHandleResolver.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GdxFileSystem.java From gdx-ai with Apache License 2.0 | 6 votes |
@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 }
Example #2
Source File: EnvironmentUtil.java From gdx-gltf with Apache License 2.0 | 5 votes |
public static Cubemap createCubemap(FileHandleResolver resolver, String baseName, String midName, String extension, int lods, String [] faceNames) { FileHandle [] files = new FileHandle[6 * lods]; for(int level = 0 ; level<lods ; level++){ for(int face = 0 ; face < 6 ; face++){ files[level*6+face] = resolver.resolve(baseName + faceNames[face] + midName + level + extension); } } FacedMultiCubemapData data = new FacedMultiCubemapData(files, lods); Cubemap cubemap = new Cubemap(data); cubemap.setFilter(TextureFilter.MipMap, TextureFilter.Linear); return cubemap; }
Example #3
Source File: StandaloneFileSystem.java From gdx-ai with Apache License 2.0 | 5 votes |
@Override public FileHandleResolver newResolver (final FileType fileType) { return new FileHandleResolver() { @Override public FileHandle resolve (String fileName) { return new DesktopFileHandle(fileName, fileType); } }; }
Example #4
Source File: BehaviorTreeLibrary.java From gdx-ai with Apache License 2.0 | 5 votes |
@SuppressWarnings("rawtypes") private BehaviorTreeLibrary (FileHandleResolver resolver, AssetManager assetManager, int parseDebugLevel) { this.resolver = resolver; // this.assetManager = assetManager; this.repository = new ObjectMap<String, BehaviorTree<?>>(); this.parser = new BehaviorTreeParser(parseDebugLevel); }
Example #5
Source File: EngineAssetManager.java From bladecoder-adventure-engine with Apache License 2.0 | 5 votes |
private Resolution[] getResolutions(FileHandleResolver resolver, int worldWidth, int worldHeight) { ArrayList<Resolution> rl = new ArrayList<>(); String list[] = null; String configRes = Config.getInstance().getProperty(Config.RESOLUTIONS, null); if (configRes != null) { list = configRes.split(","); } else { list = listAssetFiles("ui"); } for (String name : list) { try { float scale = Float.parseFloat(name); EngineLogger.debug("RES FOUND: " + scale); Resolution r = new Resolution((int) (worldWidth * scale), (int) (worldHeight * scale), name); rl.add(r); } catch (NumberFormatException e) { } } Collections.sort(rl, new Comparator<Resolution>() { @Override public int compare(Resolution a, Resolution b) { return a.portraitWidth - b.portraitWidth; } }); return rl.toArray(new Resolution[rl.size()]); }
Example #6
Source File: EngineAssetManager.java From bladecoder-adventure-engine with Apache License 2.0 | 5 votes |
protected EngineAssetManager(FileHandleResolver resolver) { super(resolver); resResolver = new EngineResolutionFileResolver(resolver); setLoader(Texture.class, new TextureLoader(resResolver)); setLoader(TextureAtlas.class, new TextureAtlasLoader(resResolver)); setLoader(FreeTypeFontGenerator.class, new FreeTypeFontGeneratorLoader(resolver)); setLoader(BitmapFont.class, ".ttf", new FreetypeFontLoader(resolver)); Texture.setAssetManager(this); }
Example #7
Source File: EnvironmentUtil.java From gdx-gltf with Apache License 2.0 | 5 votes |
public static Cubemap createCubemap(FileHandleResolver resolver, String baseName, String extension, String [] faceNames) { Cubemap cubemap = new Cubemap( resolver.resolve(baseName + faceNames[0] + extension), resolver.resolve(baseName + faceNames[1] + extension), resolver.resolve(baseName + faceNames[2] + extension), resolver.resolve(baseName + faceNames[3] + extension), resolver.resolve(baseName + faceNames[4] + extension), resolver.resolve(baseName + faceNames[5] + extension)); cubemap.setFilter(TextureFilter.Linear, TextureFilter.Linear); return cubemap; }
Example #8
Source File: BitmapFontLoader.java From riiablo with Apache License 2.0 | 4 votes |
public BitmapFontLoader(FileHandleResolver resolver) { super(resolver); }
Example #9
Source File: COFLoader.java From riiablo with Apache License 2.0 | 4 votes |
public COFLoader(FileHandleResolver resolver) { super(resolver); }
Example #10
Source File: TXTLoader.java From riiablo with Apache License 2.0 | 4 votes |
public TXTLoader(FileHandleResolver resolver) { super(resolver); }
Example #11
Source File: GdxFileSuggester.java From riiablo with Apache License 2.0 | 4 votes |
public GdxFileSuggester(@NonNull FileHandleResolver resolver) { this.RESOLVER = Validate.notNull(resolver, "resolver cannot be null"); this.FILTER = null; }
Example #12
Source File: GdxFileSuggester.java From riiablo with Apache License 2.0 | 4 votes |
public GdxFileSuggester(@NonNull FileHandleResolver resolver, @NonNull FilenameFilter filter) { this.RESOLVER = Validate.notNull(resolver, "resolver cannot be null"); this.FILTER = Validate.notNull(filter, "filter cannot be null"); }
Example #13
Source File: VolumeControlledSoundLoader.java From riiablo with Apache License 2.0 | 4 votes |
public VolumeControlledSoundLoader(@NonNull FileHandleResolver resolver, @NonNull VolumeController<Sound> controller) { super(resolver); this.controller = Validate.notNull(controller, "VolumeController cannot be null"); }
Example #14
Source File: VolumeControlledMusicLoader.java From riiablo with Apache License 2.0 | 4 votes |
public VolumeControlledMusicLoader(@NonNull FileHandleResolver resolver, @NonNull VolumeController<Music> controller) { super(resolver); this.controller = Validate.notNull(controller, "VolumeController cannot be null"); }
Example #15
Source File: MG3dModelLoader.java From Mundus with Apache License 2.0 | 4 votes |
public MG3dModelLoader(BaseJsonReader reader, FileHandleResolver resolver) { super(resolver); this.reader = reader; }
Example #16
Source File: EngineResolutionFileResolver.java From bladecoder-adventure-engine with Apache License 2.0 | 4 votes |
public EngineResolutionFileResolver(FileHandleResolver baseResolver) { this.baseResolver = baseResolver; }
Example #17
Source File: EngineResolutionFileResolver.java From bladecoder-adventure-engine with Apache License 2.0 | 4 votes |
public FileHandleResolver getBaseResolver() { return baseResolver; }
Example #18
Source File: MyNavTmxMapLoader.java From Norii with Apache License 2.0 | 4 votes |
public MyNavTmxMapLoader(FileHandleResolver resolver){ this(resolver, "navigation", "walkable", "0"); }
Example #19
Source File: UAtlasTmxMapLoader.java From uracer-kotd with Apache License 2.0 | 4 votes |
public UAtlasTmxMapLoader (FileHandleResolver resolver) { super(resolver); }
Example #20
Source File: SkeletonDataLoader.java From bladecoder-adventure-engine with Apache License 2.0 | 4 votes |
public SkeletonDataLoader(FileHandleResolver resolver) { super(resolver); }
Example #21
Source File: HeadlessG3dModelLoader.java From gdx-proto with Apache License 2.0 | 4 votes |
public HeadlessG3dModelLoader(BaseJsonReader reader, FileHandleResolver resolver) { super(resolver); this.reader = reader; }
Example #22
Source File: HeadlessModelLoader.java From gdx-proto with Apache License 2.0 | 4 votes |
public HeadlessModelLoader(FileHandleResolver resolver) { super(resolver); }
Example #23
Source File: NavTmxMapLoader.java From pathfinding with Apache License 2.0 | 4 votes |
public NavTmxMapLoader(FileHandleResolver resolver){ this(resolver, "navigation", "walkable", "0"); }
Example #24
Source File: NavTmxMapLoader.java From pathfinding with Apache License 2.0 | 4 votes |
public NavTmxMapLoader(FileHandleResolver handler, String navigationLayerName, String navigationProperty, String navigationClosedValue){ super(handler); this.navigationLayerName = navigationLayerName; this.navigationProperty = navigationProperty; this.navigationClosedValue = navigationClosedValue; }
Example #25
Source File: BehaviorTreeLoader.java From gdx-ai with Apache License 2.0 | 4 votes |
public BehaviorTreeLoader (FileHandleResolver resolver) { super(resolver); }
Example #26
Source File: BehaviorTreeLibrary.java From gdx-ai with Apache License 2.0 | 4 votes |
/** Creates a {@code BehaviorTreeLibrary} with the given resolver. * @param resolver the {@link FileHandleResolver} */ public BehaviorTreeLibrary (FileHandleResolver resolver) { this(resolver, BehaviorTreeParser.DEBUG_NONE); }
Example #27
Source File: BehaviorTreeLibrary.java From gdx-ai with Apache License 2.0 | 4 votes |
/** Creates a {@code BehaviorTreeLibrary} with the given resolver and debug level. * @param resolver the {@link FileHandleResolver} * @param parseDebugLevel the debug level the parser will use */ public BehaviorTreeLibrary (FileHandleResolver resolver, int parseDebugLevel) { this(resolver, null, parseDebugLevel); }
Example #28
Source File: GLBAssetLoader.java From gdx-gltf with Apache License 2.0 | 4 votes |
public GLBAssetLoader(FileHandleResolver resolver) { super(resolver); }
Example #29
Source File: GLTFAssetLoader.java From gdx-gltf with Apache License 2.0 | 4 votes |
public GLTFAssetLoader(FileHandleResolver resolver) { super(resolver); }
Example #30
Source File: MidiSequenceLoader.java From gdx-pd with Apache License 2.0 | 4 votes |
public MidiSequenceLoader(FileHandleResolver resolver) { super(resolver); }