Interface Element<E extends java.lang.Number>
- All Known Implementing Classes:
BlackListCell
,Cell
,CrossableCell
,Entity
,HUDElement
,OutOfBoundCell
,RestrictiveCell
,UncrossableCell
,VoidCell
,Wall
,WhiteListCell
public interface Element<E extends java.lang.Number>
A graphical element. Could be a Cell, an Entity or anything graphical.
Possess coordinates, a Sprite and a Name.
-
Method Summary
Modifier and Type Method Description Coordinates<E>
getCoordinates()
Coordinates of the element in the game.Dimension
getDimension()
Return dimension of the Element.java.lang.String
getName()
Name getter of the elementSprite
getSprite()
Returns sprite of the elementvoid
setCoordinates(Coordinates<E> coordinates)
Allows setting new coordinates for the element.void
setDimension(Dimension dimension)
Allows to set dimension of the element, representing its size.void
setSprite(Sprite sprite)
Set sprite of an element
-
Method Details
-
getDimension
Dimension getDimension()Return dimension of the Element. Represents the size of the Element.- Returns:
- Dimension of the element
-
setDimension
Allows to set dimension of the element, representing its size.- Parameters:
dimension
- Dimension to set
-
getSprite
Sprite getSprite()Returns sprite of the element- Returns:
- Sprite of the element
-
setSprite
Set sprite of an element- Parameters:
sprite
- sprite to set
-
getCoordinates
Coordinates<E> getCoordinates()Coordinates of the element in the game.- Returns:
- Coordinates of the element
-
setCoordinates
Allows setting new coordinates for the element.- Parameters:
coordinates
- new coordinates
-
getName
java.lang.String getName()Name getter of the element- Returns:
- String name of the element
-