List of usage examples for com.badlogic.gdx.graphics.g2d TextureAtlas TextureAtlas
public TextureAtlas(FileHandle packFile, FileHandle imagesDir)
From source file:com.badlydrawngames.veryangryrobots.Assets.java
License:Apache License
public static void load() { pixelDensity = calculatePixelDensity(); String textureDir = "data/textures/" + (int) pixelDensity; String textureFile = textureDir + "/pack"; atlas = new TextureAtlas(Gdx.files.internal(textureFile), Gdx.files.internal(textureDir)); loadTextures();//from w ww. j ava 2 s. c o m createAnimations(); loadFonts(); loadSounds(); initialiseGeometries(); }
From source file:com.tnf.ptm.assets.atlas.AtlasFileFormat.java
License:Apache License
@Override public AtlasData load(ResourceUrn urn, List<AssetDataFile> inputs) throws IOException { String path = AssetHelper.resolveToPath(inputs.get(0)); FileHandle handle = new FileHandle(Paths.get(path).toFile()); return new AtlasData(new TextureAtlas(handle, true)); }
From source file:com.todoroo.zxzx.Assets.java
License:Apache License
public static void load() { String textureDir = "sprites"; String textureFile = textureDir + "/pack"; atlas = new TextureAtlas(Gdx.files.internal(textureFile), Gdx.files.internal(textureDir)); loadTextures();//from ww w .j a va 2s. c om createAnimations(); loadFonts(); loadSounds(); initialiseGeometries(); }
From source file:org.destinationsol.AtlasTextureProvider.java
License:Apache License
AtlasTextureProvider(FileHandle atlasFile) {
myAtlas = new TextureAtlas(atlasFile, true);
}
From source file:se.danielj.geometridestroyer.misc.SpriteManager.java
License:GNU General Public License
public static void init() { sprites = new HashMap<String, AtlasRegion>(); textureAtlas = new TextureAtlas(Gdx.files.internal("sprites/sprites.atlas"), Gdx.files.internal("sprites")); for (AtlasRegion r : textureAtlas.getRegions()) { sprites.put(r.name, r);/*from ww w .j a va 2 s. c o m*/ } }
From source file:se.danielj.slashatthegame.misc.SpriteManager.java
License:GNU General Public License
public static void init() { if (textureAtlas == null) { sprites = new HashMap<String, AtlasRegion>(); textureAtlas = new TextureAtlas(Gdx.files.internal("sprites/sprites.atlas"), Gdx.files.internal("sprites")); for (AtlasRegion r : textureAtlas.getRegions()) { sprites.put(r.name, r);/* w w w.j a v a 2s . com*/ } } }