Class Cursor


  • public class Cursor
    extends Object
    Cursor definition, contains the unique id, the image path, the x offset, if any, the y offset if any.
    Author:
    Grégory Van den Borre
    • Constructor Detail

      • Cursor

        public Cursor​(String id,
                      String path)
        Build a new Cursor without any offset.
        Parameters:
        id - Unique id.
        path - Path to the graphic asset.
      • Cursor

        public Cursor​(String id,
                      String path,
                      int offsetX,
                      int offsetY)
        Build a new Cursor with offset.
        Parameters:
        id - Unique id.
        path - Path to the graphic asset.
        offsetX - Cursor position x offset, in pixels.
        offsetY - Cursor position y offset, in pixels.
    • Method Detail

      • getId

        public final String getId()
      • getPath

        public final String getPath()
      • getX

        public final int getX()
      • getY

        public final int getY()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object