Class Sprite

  • All Implemented Interfaces:
    Drawable

    public class Sprite
    extends Quad
    A Quad with texture.
    • Constructor Detail

      • Sprite

        public Sprite​(Texture texture)
        Texture constructor.
        Parameters:
        texture - Texture.
      • Sprite

        public Sprite​(Texture texture,
                      Color color)
        Default Constructor. Requires a texture and a color.
        Parameters:
        texture - Texture.
        color - Color.
    • Method Detail

      • draw

        public void draw​(int frame)
        Description copied from interface: Drawable
        Draws the drawable on the given frame.
        Specified by:
        draw in interface Drawable
        Overrides:
        draw in class Quad