rename JsonTextureAtlasDefinition

This commit is contained in:
Gered 2014-04-16 07:57:54 -04:00
parent 5bc98d5285
commit 814ceecacd
3 changed files with 5 additions and 5 deletions

View file

@ -2,7 +2,7 @@ package ca.blarg.gdx.assets.textureatlas;
import java.util.ArrayList; import java.util.ArrayList;
public class JsonTextureAtlasDefinition { public class JsonTextureAtlas {
public String texture; public String texture;
public ArrayList<JsonMaterialMapping> materialMapping; public ArrayList<JsonMaterialMapping> materialMapping;
public ArrayList<JsonTextureAtlasTile> tiles; public ArrayList<JsonTextureAtlasTile> tiles;

View file

@ -9,12 +9,12 @@ import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.utils.Json; import com.badlogic.gdx.utils.Json;
class TextureAtlasJsonLoader { class TextureAtlasJsonLoader {
public static JsonTextureAtlasDefinition load(FileHandle file) { public static JsonTextureAtlas load(FileHandle file) {
Json json = new Json(); Json json = new Json();
return json.fromJson(JsonTextureAtlasDefinition.class, file); return json.fromJson(JsonTextureAtlas.class, file);
} }
public static TextureAtlas create(FileHandle file, JsonTextureAtlasDefinition definition, AssetManager assetManager) { public static TextureAtlas create(FileHandle file, JsonTextureAtlas definition, AssetManager assetManager) {
if (definition.texture == null) if (definition.texture == null)
throw new AssetLoadingException(file.path(), "No texture specified."); throw new AssetLoadingException(file.path(), "No texture specified.");
if (definition.tiles == null || definition.tiles.size() == 0) if (definition.tiles == null || definition.tiles.size() == 0)

View file

@ -16,7 +16,7 @@ public class TextureAtlasLoader extends AsynchronousAssetLoader<TextureAtlas, Te
super(resolver); super(resolver);
} }
JsonTextureAtlasDefinition definition; JsonTextureAtlas definition;
TextureAtlas atlas; TextureAtlas atlas;
@Override @Override