Class Sprite


  • public class Sprite
    extends java.lang.Object
    A row, or "strip", of individual frames for an entity (they are all the same height and width)
    See Also:
    SpriteSheet, Entity
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.util.ArrayList<org.newdawn.slick.Image> frames
      All of the possible frames that the sprite could use
      int height
      Height in pixels
      int width
      Width in pixels
    • Constructor Summary

      Constructors 
      Constructor Description
      Sprite​(org.newdawn.slick.Image image)  
      Sprite​(org.newdawn.slick.Image row, int frames)  
      Sprite​(org.newdawn.slick.Image row, int width, int height, int frames)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.newdawn.slick.Image asImage()  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • frames

        public java.util.ArrayList<org.newdawn.slick.Image> frames
        All of the possible frames that the sprite could use
        See Also:
        AnimatedEntity, StaticEntity
      • width

        public int width
        Width in pixels
      • height

        public int height
        Height in pixels
    • Constructor Detail

      • Sprite

        public Sprite​(org.newdawn.slick.Image image)
      • Sprite

        public Sprite​(org.newdawn.slick.Image row,
                      int frames)
      • Sprite

        public Sprite​(org.newdawn.slick.Image row,
                      int width,
                      int height,
                      int frames)
    • Method Detail

      • asImage

        public org.newdawn.slick.Image asImage()