Interface Renderable

All Known Subinterfaces:
Actor, Clickable, GameEntity, GraphicsObject, 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

    Modifier and Type
    Method
    Description
    boolean
    contains(Point point)
    Determines if this entity contains the given point.
    default void
    draw(PaintContext paintCtx)
    Renders this entity.
    default void
    draw(PaintContext paintCtx, Color color)
    Renders this entity.
    default void
    draw(PaintContext paintCtx, Color color, int strokeWidth)
    Renders this entity.
    Gets the central point within the entity calculated using only visible model points.
    Get a random point within the entity.
    Gets the central point within the entity calculated using visible and non-visible model points.
    boolean
    Gets if this entity is visible on screen.
  • Method Details

    • isVisible

      boolean isVisible()
      Gets if this entity is visible on screen.
      Returns:
      true if visible, false otherwise
    • contains

      boolean contains(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

      Point getRandomPoint()
      Get a random point within the entity.
      Returns:
      Point
    • getCentralPoint

      Point getCentralPoint()
      Gets the central point within the entity calculated using only visible model points.
      Returns:
      Point
      See Also:
    • getRealCentralPoint

      Point getRealCentralPoint()
      Gets the central point within the entity calculated using visible and non-visible model points.
      Returns:
      Point
      See Also:
    • draw

      default void draw(PaintContext paintCtx)
      Renders this entity.
      Parameters:
      paintCtx - the paint context
    • draw

      default void draw(PaintContext paintCtx, Color color)
      Renders this entity.
      Parameters:
      paintCtx - the paint context
    • draw

      default void draw(PaintContext paintCtx, Color color, int strokeWidth)
      Renders this entity.
      Parameters:
      paintCtx - the paint context