Class BasicDrawable
- java.lang.Object
-
- de.unistuttgart.informatik.fius.icge.ui.BasicDrawable
-
- All Implemented Interfaces:
Drawable,Comparable<Drawable>
- Direct Known Subclasses:
UntilableDrawable
public class BasicDrawable extends Object implements Drawable
A class containing all information needed to draw an object onto the playfield by aPlayfieldDrawer.- Author:
- Tim Neumann
-
-
Constructor Summary
Constructors Constructor Description BasicDrawable(double x, double y, int z, String textureHandle)Create a new Drawable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetTextureHandle()Get the handle of the texture for this drawable.doublegetX()Get the x coordinate of the drawable.doublegetY()Get the y coordinate of the drawable.intgetZ()Get the z value of the drawable.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.unistuttgart.informatik.fius.icge.ui.Drawable
compareTo, isAnimated, isTilable, setCurrentTick
-
-
-
-
Constructor Detail
-
BasicDrawable
public BasicDrawable(double x, double y, int z, String textureHandle)Create a new Drawable.- Parameters:
x- coordinatey- coordinatez- valuetextureHandle- the handle of the texture used for this drawable
-
-
Method Detail
-
getX
public double getX()
Description copied from interface:DrawableGet the x coordinate of the drawable. The coordinate system is based on cells where fractionals denote positions between cells.
-
getY
public double getY()
Description copied from interface:DrawableGet the y coordinate of the drawable. The coordinate system is based on cells where fractionals denote positions between cells.
-
getZ
public int getZ()
Description copied from interface:DrawableGet the z value of the drawable. The z value is used to decide the drawing order of Drawables in the same cell.
-
getTextureHandle
public String getTextureHandle()
Description copied from interface:DrawableGet the handle of the texture for this drawable. The texture must be registered in the TextureRegistry.- Specified by:
getTextureHandlein interfaceDrawable- Returns:
- returns the texture handle as a String
-
-