Interface IGameScreen

All Known Implementing Classes:
GameScreen

public interface IGameScreen
  • Field Details

    • SIZE_UNIT_PIXELS

      static final int SIZE_UNIT_PIXELS
      The width / height of one tile.
      See Also:
      Constant Field Values
  • Method Details

    • nextFrame

      void nextFrame()
      Prepare screen for the next frame to be rendered and move it if needed .
    • center

      void center()
      Center the view.
    • setOffline

      void setOffline(boolean offline)
      Set the offline indication state.
      Parameters:
      offline - true if offline.
    • removeText

      void removeText(RemovableSprite entity)
      Removes a text bubble.
      Parameters:
      entity - The text to be removed.
    • clearTexts

      void clearTexts()
      Removes all the text entities.
    • getEntityViewAt

      EntityView<?> getEntityViewAt(double x, double y)
      Gets an entity view at given coordinates.
      Parameters:
      x - The X world coordinate.
      y - The Y world coordinate.
      Returns:
      The entity view, or null if none found.
    • getMovableEntityViewAt

      EntityView<?> getMovableEntityViewAt(double x, double y)
      Get a movable entity view at given coordinates.
      Parameters:
      x - The X world coordinate.
      y - The Y world coordinate.
      Returns:
      The entity view, or null if none found.
    • getTextAt

      RemovableSprite getTextAt(int x, int y)
      Get the text bubble at specific coordinates.
      Parameters:
      x - Screen X coordinate.
      y - Screen Y world coordinate.
      Returns:
      the text bubble at the given coordinate or null if not found.
    • convertScreenViewToWorld

      Point2D convertScreenViewToWorld(Point p)
      Convert screen view coordinates to world coordinates.
      Parameters:
      p - The screen view coordinates.
      Returns:
      World coordinates.
    • convertScreenViewToWorld

      Point2D convertScreenViewToWorld(int x, int y)
      Convert screen view coordinates to world coordinates.
      Parameters:
      x - The screen view X coordinate.
      y - The screen view Y coordinate.
      Returns:
      World coordinates.
    • positionChanged

      void positionChanged(double x, double y)
      The user position changed. This sets the target coordinates that the screen centers on.
      Parameters:
      x - The X coordinate (in world units).
      y - The Y coordinate (in world units).