Class BasicDrawable

    • Constructor Detail

      • BasicDrawable

        public BasicDrawable​(double x,
                             double y,
                             int z,
                             String textureHandle)
        Create a new Drawable.
        Parameters:
        x - coordinate
        y - coordinate
        z - value
        textureHandle - the handle of the texture used for this drawable
    • Method Detail

      • getX

        public double getX()
        Description copied from interface: Drawable
        Get the x coordinate of the drawable. The coordinate system is based on cells where fractionals denote positions between cells.
        Specified by:
        getX in interface Drawable
        Returns:
        returns the X position as a double
      • getY

        public double getY()
        Description copied from interface: Drawable
        Get the y coordinate of the drawable. The coordinate system is based on cells where fractionals denote positions between cells.
        Specified by:
        getY in interface Drawable
        Returns:
        returns the Y position as a double
      • getZ

        public int getZ()
        Description copied from interface: Drawable
        Get the z value of the drawable. The z value is used to decide the drawing order of Drawables in the same cell.
        Specified by:
        getZ in interface Drawable
        Returns:
        returns the Z position as a double
      • getTextureHandle

        public String getTextureHandle()
        Description copied from interface: Drawable
        Get the handle of the texture for this drawable. The texture must be registered in the TextureRegistry.
        Specified by:
        getTextureHandle in interface Drawable
        Returns:
        returns the texture handle as a String