Class SpriteLoader

java.lang.Object
buildengine.engine.graphics.animation.SpriteLoader

public class SpriteLoader extends Object
Static utility for Sprite and BufferedImage[] loading.
  • Method Details

    • loadSpriteSheet

      public static BufferedImage[][] loadSpriteSheet(String imagePath, int width, int height)
      Loads spritesheet from an image
      Parameters:
      imagePath - The image file containing the spritesheet
      width - The width of one frame
      height - The height of one frame
      Returns:
      A new BufferedImage array object
    • loadFrames

      public static BufferedImage[] loadFrames(String imagePath, int width)
      Loads frames from an image using the height of the image
      Parameters:
      imagePath - The image file containing frames
      width - The width of one frame
      Returns:
      A new BufferedImage array object
    • loadFrames

      public static BufferedImage[] loadFrames(String imagePath, int width, int height)
      Loads frames from an image
      Parameters:
      imagePath - The image file containing frames
      width - The width of one frame
      height - The height of one frame
      Returns:
      A new BufferedImage array object
    • loadSprite

      public static Sprite loadSprite(String imagePath, int width)
      Loads a sprite from an image
      Parameters:
      imagePath - The image file containing a sprite
      width - The width of one frame
      Returns:
      A new sprite object