public class SpriteSheet
A sprite sheet requires two files, an image file and a JSON file containing names and coordinates in the image for the sprites.
Constructor and Description |
---|
SpriteSheet(java.lang.String file)
A sprite sheet requires two files, an image file and a JSON file containing names and coordinates in the image
for the sprites.
|
Modifier and Type | Method and Description |
---|---|
AnimatedTexture |
getAnim(java.lang.String name) |
java.lang.String |
getFile()
The JSON file,
|
java.util.List<java.lang.Float> |
getFrameDelays(java.lang.String tag) |
java.util.List<com.badlogic.gdx.graphics.g2d.TextureRegion> |
getFrames(java.lang.String tag) |
com.badlogic.gdx.graphics.g2d.TextureRegion |
getTextureRegion(java.lang.String name,
int num) |
public SpriteSheet(java.lang.String file)
A sprite sheet requires two files, an image file and a JSON file containing names and coordinates in the image for the sprites.
file
- The JSON file, output by Asperitefile
- The JSON file, output by Asperitepublic com.badlogic.gdx.graphics.g2d.TextureRegion getTextureRegion(java.lang.String name, int num)
public java.util.List<com.badlogic.gdx.graphics.g2d.TextureRegion> getFrames(java.lang.String tag)
public java.util.List<java.lang.Float> getFrameDelays(java.lang.String tag)
public AnimatedTexture getAnim(java.lang.String name)
public java.lang.String getFile()
The JSON file,
output by Asperite