Class SpriteLoader
java.lang.Object
buildengine.engine.graphics.animation.SpriteLoader
Static utility for Sprite and BufferedImage[] loading.
-
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImage[]
loadFrames
(String imagePath, int width) Loads frames from an image using the height of the imagestatic BufferedImage[]
loadFrames
(String imagePath, int width, int height) Loads frames from an imagestatic Sprite
loadSprite
(String imagePath, int width) Loads a sprite from an imagestatic BufferedImage[][]
loadSpriteSheet
(String imagePath, int width, int height) Loads spritesheet from an image
-
Method Details
-
loadSpriteSheet
Loads spritesheet from an image- Parameters:
imagePath
- The image file containing the spritesheetwidth
- The width of one frameheight
- The height of one frame- Returns:
- A new BufferedImage array object
-
loadFrames
Loads frames from an image using the height of the image- Parameters:
imagePath
- The image file containing frameswidth
- The width of one frame- Returns:
- A new BufferedImage array object
-
loadFrames
Loads frames from an image- Parameters:
imagePath
- The image file containing frameswidth
- The width of one frameheight
- The height of one frame- Returns:
- A new BufferedImage array object
-
loadSprite
Loads a sprite from an image- Parameters:
imagePath
- The image file containing a spritewidth
- The width of one frame- Returns:
- A new sprite object
-