Interface Renderable
-
- All Known Subinterfaces:
Actor
,Clickable
,GameEntity
,GroundItem
,Interactable
,ItemWidget
,LocatableEntity
,NPC
,Player
,Projectile
,SceneObject
,WidgetChild
- All Known Implementing Classes:
Tile
public interface Renderable
An entity that is rendered in the game.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
contains(java.awt.Point point)
Determines if this entity contains the given point.void
draw(java.awt.Graphics2D g2d)
Renders this entity onto the given graphics.java.awt.Point
getCentralPoint()
Gets the central point within the entity calculated using only visible model points.java.awt.Point
getRandomPoint()
Get a random point within the entity.java.awt.Point
getRealCentralPoint()
Gets the central point within the entity calculated using visible and non-visible model points.boolean
isVisible()
Gets if this entity is visible on screen.
-
-
-
Method Detail
-
isVisible
boolean isVisible()
Gets if this entity is visible on screen.- Returns:
- true if visible, false otherwise
-
contains
boolean contains(java.awt.Point point)
Determines if this entity contains the given point.- Parameters:
point
- the point- Returns:
- true if this entity contains the point, false otherwise
-
getRandomPoint
java.awt.Point getRandomPoint()
Get a random point within the entity.- Returns:
Point
-
getCentralPoint
java.awt.Point getCentralPoint()
Gets the central point within the entity calculated using only visible model points.- Returns:
Point
- See Also:
Model.getCentralPoint(int, int, int, int, int)
-
getRealCentralPoint
java.awt.Point getRealCentralPoint()
Gets the central point within the entity calculated using visible and non-visible model points.- Returns:
Point
- See Also:
Model.getRealCentralPoint(int, int, int, int, int)
-
draw
void draw(java.awt.Graphics2D g2d)
Renders this entity onto the given graphics.- Parameters:
g2d
- the graphics
-
-