Interface TileProvider

All Superinterfaces:
EntityContext, EntityProvider
All Known Implementing Classes:
MultiTileRenderer, PhantomTile, TileRenderer

public interface TileProvider extends EntityProvider
Provides access to a TileRenderer component.
  • Method Details

    • moveBy

      default void moveBy(Vector2i coordinate)
      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 value
      y - Y value
    • moveTo

      default boolean moveTo(int x, int y)
      Moves this tile to an XY-coordinate.
      Parameters:
      x - X value
      y - Y value
      Returns:
      True if the coordinate of this tile was changed.
    • moveTo

      default boolean moveTo(Vector2i coordinate)
      Moves this tile to a coordinate.
      Parameters:
      coordinate - Coordinate
      Returns:
      True if the coordinate of this tile was changed.
    • setCoordinate

      default void setCoordinate(Vector2i coordinate)
    • getCoordinate

      default Vector2i getCoordinate()
    • setSize

      default void setSize(int size)
    • isHovering

      default boolean isHovering()
    • remove

      default void remove()
      Removes this tile from its grid.
    • getTransform

      default Transform getTransform()
      Specified by:
      getTransform in interface EntityProvider
    • getEntity

      default Entity getEntity()
      Specified by:
      getEntity in interface EntityProvider
    • getGroup

      default GridGroup getGroup()
      Returns:
      The grid this tile belongs to, or null if this tile is not in a grid.
    • getTile

      TileRenderer getTile()