Class Sheet

  • All Implemented Interfaces:
    Constants

    public class Sheet
    extends java.lang.Object
    implements Constants
    This class handles loading the images and sub-images
    • Constructor Detail

      • Sheet

        public Sheet​(java.lang.String path,
                     int height,
                     int width)
        Initialize the texture collection
        Parameters:
        path - The path to the image
        height - The height of the textures in the image
        width - The width of the textures in the image
    • Method Detail

      • getTexture

        public java.awt.image.BufferedImage getTexture​(int textureNumber)
                                                throws SheetException
        Returns the selected texture
        Parameters:
        textureNumber - The texture to get from the collection
        Returns:
        Returns the current texture
        Throws:
        SheetException - Thrown when there are no images in the texture collection