Interface TileProvider
- All Superinterfaces:
EntityContext,EntityProvider
- All Known Implementing Classes:
MultiTileRenderer,PhantomTile,TileRenderer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@ProviderOf(TileRenderer.class)
@FunctionalInterface
public interface TileProvider
extends EntityProvider
Provides access to a
TileRenderer component.-
Method Summary
Modifier and TypeMethodDescriptiondefault Vector2idefault Entitydefault GridGroupgetGroup()getTile()default Transformdefault booleandefault voidmoveBy(int x, int y) Moves this tile by an x and y amount.default voidMoves this tile by an x and y amount based on a coordinatedefault booleanmoveTo(int x, int y) Moves this tile to an XY-coordinate.default booleanMoves this tile to a coordinate.default voidremove()Removes this tile from its grid.default voidsetCoordinate(Vector2i coordinate) default voidsetSize(int size) Methods inherited from interface dev.prozilla.pine.core.entity.EntityContext
isDescendantOfMethods inherited from interface dev.prozilla.pine.core.entity.EntityProvider
getChild, 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:
getTransformin interfaceEntityProvider
-
getEntity
- Specified by:
getEntityin interfaceEntityProvider
-
getGroup
- Returns:
- The grid this tile belongs to, or
nullif this tile is not in a grid.
-
getTile
TileRenderer getTile()
-