Back to project page acceptableLosses.
The source code is released under:
MIT License
If you think the Android project acceptableLosses listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package acceptableLosses.assets; // ww w. ja v a 2 s . c om import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.g2d.TextureAtlas; public class AssetLoader { public static TextureAtlas atlas; public static void init() { atlas = new TextureAtlas(Gdx.files.internal("textures/tile.atlas")); for (TileType tileType : TileType.values()) { tileType.texture = atlas.findRegion("wall/" + tileType.textureName); tileType.floor = atlas.findRegion("floor/" + tileType.textureName); } for (FurnitureType furnitureType : FurnitureType.values()) { furnitureType.texture = atlas.findRegion("building/" + furnitureType.textureName); } } public static void dispose() { atlas.dispose(); } }