/** * Add a texture for a specific map name at the location of another existing texture (on the master map). * @param texture A texture to add to the atlas. * @param mapName A freely chosen map name that can be later retrieved as a Texture. * @param sourceTextureName Name of the master map used for the location. */ public void addTexture(Texture texture, String mapName, String sourceTextureName) { if (texture == null) { throw new IllegalStateException("Texture cannot be null!"); } String name = textureName(texture); if (texture.getImage() != null && name != null) { addImage(texture.getImage(), name, mapName, sourceTextureName); } else { throw new IllegalStateException("Texture has no asset key name!"); } }
/** * Add a texture for a specific map name * @param texture A texture to add to the atlas. * @param mapName A freely chosen map name that can be later retrieved as a Texture. The first map name supplied will be the master map. * @return false if the atlas is full. */ public boolean addTexture(Texture texture, String mapName) { if (texture == null) { throw new IllegalStateException("Texture cannot be null!"); } String name = textureName(texture); if (texture.getImage() != null && name != null) { return addImage(texture.getImage(), name, mapName, null); } else { throw new IllegalStateException("Texture has no asset key name!"); } }
/** * Add a texture for a specific map name * @param texture A texture to add to the atlas. * @param mapName A freely chosen map name that can be later retrieved as a Texture. The first map name supplied will be the master map. * @return false if the atlas is full. */ public boolean addTexture(Texture texture, String mapName) { if (texture == null) { throw new IllegalStateException("Texture cannot be null!"); } String name = textureName(texture); if (texture.getImage() != null && name != null) { return addImage(texture.getImage(), name, mapName, null); } else { throw new IllegalStateException("Texture has no asset key name!"); } }
/** * Add a texture for a specific map name at the location of another existing texture (on the master map). * @param texture A texture to add to the atlas. * @param mapName A freely chosen map name that can be later retrieved as a Texture. * @param sourceTextureName Name of the master map used for the location. */ public void addTexture(Texture texture, String mapName, String sourceTextureName) { if (texture == null) { throw new IllegalStateException("Texture cannot be null!"); } String name = textureName(texture); if (texture.getImage() != null && name != null) { addImage(texture.getImage(), name, mapName, sourceTextureName); } else { throw new IllegalStateException("Texture has no asset key name!"); } }