Package tiles
Class Spritesheet
java.lang.Object
tiles.Spritesheet
-
Constructor Summary
ConstructorDescriptionSpritesheet
(Texture texture, int spriteWidth, int spriteHeight, int numSprites, int spacing) Takes a texture, sprite width, height, number of sprites and the pixel spacing between sprites (if applicable), and adds each sprite in the sheet to a List. -
Method Summary
-
Constructor Details
-
Spritesheet
Takes a texture, sprite width, height, number of sprites and the pixel spacing between sprites (if applicable), and adds each sprite in the sheet to a List.- Parameters:
texture
-spriteWidth
-spriteHeight
-numSprites
-spacing
-
-
-
Method Details
-
getSize
public int getSize()Returns the integer size of the List of Sprites- Returns:
- int size
-
getSprite
Return a single sprite by passing it's index in the sprite list- Parameters:
index
- of the sprite- Returns:
- Sprite
-
getSprites
- Returns:
- entire list of sprites contained in Spritesheet
-