Class TileRenderer
java.lang.Object
dev.prozilla.pine.core.component.Component
dev.prozilla.pine.core.component.sprite.TileRenderer
- All Implemented Interfaces:
Lifecycle
,Printable
,ComponentFinder
,EntityFinder
A component for rendering 2D square tiles in the world.
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
Width and height of the tile, in pixels. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetGroup()
getName()
boolean
void
moveBy
(int x, int y) Moves this tile by an x and y amount.void
Moves this tile by an x and y amount based on a coordinatevoid
moveTo
(int x, int y) Moves this tile to an XY-coordinate.void
Moves this tile to a coordinate.void
remove()
Methods inherited from class dev.prozilla.pine.core.component.Component
equals, getCamera, getChildWithTag, getComponent, getComponentInParent, getComponentInParent, getComponents, getComponentsInChildren, getEntity, getInput, getLogger, getParentWithTag, getRenderer, getTimer, getTracker, getTransform, getWindow, getWorld, hashCode, setActive, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
coordinate
-
size
public int sizeWidth and height of the tile, in pixels. -
group
-
-
Constructor Details
-
TileRenderer
-
-
Method Details
-
getName
-
moveBy
Moves this tile by an x and y amount based on a coordinate- Parameters:
coordinate
- Coordinate
-
moveBy
public void moveBy(int x, int y) Moves this tile by an x and y amount.- Parameters:
x
- X valuey
- Y value
-
moveTo
public void moveTo(int x, int y) Moves this tile to an XY-coordinate.- Parameters:
x
- X valuey
- Y value
-
moveTo
Moves this tile to a coordinate.- Parameters:
coordinate
- Coordinate
-
isHovering
public boolean isHovering() -
remove
public void remove() -
getGroup
-