Interface TileProvider
- All Superinterfaces:
EntityContext
,EntityProvider
- All Known Implementing Classes:
MultiTileRenderer
,PhantomTile
,TileRenderer
Provides access to a
TileRenderer
component.-
Method Summary
Modifier and TypeMethodDescriptiondefault Vector2i
default Entity
default GridGroup
getGroup()
getTile()
default Transform
default boolean
default void
moveBy
(int x, int y) Moves this tile by an x and y amount.default void
Moves this tile by an x and y amount based on a coordinatedefault boolean
moveTo
(int x, int y) Moves this tile to an XY-coordinate.default boolean
Moves this tile to a coordinate.default void
remove()
Removes this tile from its grid.default void
setCoordinate
(Vector2i coordinate) default void
setSize
(int size) Methods inherited from interface dev.prozilla.pine.core.entity.EntityContext
isDescendantOf
Methods inherited from interface dev.prozilla.pine.core.entity.EntityProvider
getChildWithTag, getFirstChild, getLastChild, getParentWithTag, isDescendantOf
-
Method Details
-
moveBy
Moves this tile by an x and y amount based on a coordinate- Parameters:
coordinate
- Coordinate
-
moveBy
default void moveBy(int x, int y) Moves this tile by an x and y amount.- Parameters:
x
- X valuey
- Y value
-
moveTo
default boolean moveTo(int x, int y) Moves this tile to an XY-coordinate.- Parameters:
x
- X valuey
- Y value- Returns:
- True if the coordinate of this tile was changed.
-
moveTo
Moves this tile to a coordinate.- Parameters:
coordinate
- Coordinate- Returns:
- True if the coordinate of this tile was changed.
-
setCoordinate
-
getCoordinate
-
setSize
default void setSize(int size) -
isHovering
default boolean isHovering() -
remove
default void remove()Removes this tile from its grid. -
getTransform
- Specified by:
getTransform
in interfaceEntityProvider
-
getEntity
- Specified by:
getEntity
in interfaceEntityProvider
-
getGroup
- Returns:
- The grid this tile belongs to, or
null
if this tile is not in a grid.
-
getTile
TileRenderer getTile()
-