Class SceneOffset


  • public class SceneOffset
    extends java.lang.Object
    Scene offset is used to determine the exact location inside a scene/region.
    • Constructor Summary

      Constructors 
      Constructor Description
      SceneOffset​(int x, int y, int plane, int tileSize)
      Constructs a new SceneOffset
      SceneOffset​(int x, int y, int tileX, int tileY, int plane, int tileSize)
      Constructs a new SceneOffset
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getPlane()
      Gets the plane
      int getSceneX()
      Gets the x location as a region coordinate
      int getSceneY()
      Gets the y location as a region coordinate
      int getTileSize()
      Gets the size of the tile, which is the width/height (both same value).
      int getTileX()
      Gets the x location of the tile
      int getTileY()
      Gets the y location of the tile
      int getX()
      Gets the x location
      int getY()
      Gets the y location
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SceneOffset

        public SceneOffset​(int x,
                           int y,
                           int plane,
                           int tileSize)
        Constructs a new SceneOffset
        Parameters:
        x - x location
        y - y location
        plane - plane
        tileSize - tileSize
      • SceneOffset

        public SceneOffset​(int x,
                           int y,
                           int tileX,
                           int tileY,
                           int plane,
                           int tileSize)
        Constructs a new SceneOffset
        Parameters:
        x - x location
        y - y location
        tileX - tile x location
        tileY - tile y location
        plane - plane
        tileSize - tileSize
    • Method Detail

      • getX

        public int getX()
        Gets the x location
        Returns:
        x location
      • getY

        public int getY()
        Gets the y location
        Returns:
        y location
      • getPlane

        public int getPlane()
        Gets the plane
        Returns:
        plane
      • getTileX

        public int getTileX()
        Gets the x location of the tile
        Returns:
        the x location
      • getTileY

        public int getTileY()
        Gets the y location of the tile
        Returns:
        the y location
      • getSceneX

        public int getSceneX()
        Gets the x location as a region coordinate
        Returns:
        (x * tileSize) + tileX
      • getSceneY

        public int getSceneY()
        Gets the y location as a region coordinate
        Returns:
        (y * tileSize) + tileY
      • getTileSize

        public int getTileSize()
        Gets the size of the tile, which is the width/height (both same value).
        Returns:
        the size of the tile
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object