Search in sources :

Example 1 with AtlasResult

use of org.asassecreations.voxelgame.asset.AtlasResult in project Voxel_Game by ASasseCreations.

the class VoxelGame method init.

public final void init() {
    try {
        AssetLoader.loadOriginalTextures();
        AssetLoader.loadModifiedTextures();
        ChunkModel.getTexture(AssetLoader.getTextureAtlasSize());
        final AtlasResult result = AssetLoader.createAtlas();
        TEXTURE_ATLAS = result.image;
        AssetLoader.loadItems();
        Block.BLOCKS = AssetLoader.loadBlocks(result.textures);
        result.textures.clear();
    } catch (final IOException | URISyntaxException e) {
        e.printStackTrace();
    }
    manager.push(new MenuState());
}
Also used : AtlasResult(org.asassecreations.voxelgame.asset.AtlasResult) MenuState(org.asassecreations.voxelgame.state.MenuState) IOException(java.io.IOException) URISyntaxException(java.net.URISyntaxException)

Aggregations

IOException (java.io.IOException)1 URISyntaxException (java.net.URISyntaxException)1 AtlasResult (org.asassecreations.voxelgame.asset.AtlasResult)1 MenuState (org.asassecreations.voxelgame.state.MenuState)1