Class BridgeBuildSprite

All Implemented Interfaces:
ImageObserver, Comparable<Sprite>

public class BridgeBuildSprite extends HexSprite
Displays a bridge-under-construction indicator on the hex where Bridge-Building Engineers are raising a bridge (TO:AUE). Shows the finished bridge graphic for the build's orientation as a ghost image whose opacity equals the build progress (turn 1 of 6 = 1/6 visible, the final turn fully visible), so the bridge appears piece by piece over the course of the work, plus the progress as text ("2/6") in the lower portion of the hex.
  • Constructor Details

    • BridgeBuildSprite

      public BridgeBuildSprite(BoardView boardView, Coords location, int turnsWorked, int turnsRequired, int exits)
      Creates a new bridge building sprite for the given hex. The sprite shows how much of the bridge is currently standing, on the build's N / build-required scale: a build counts this up as turns are banked, a dismantling counts the same number back down to zero.
      Parameters:
      boardView - the parent board view
      location - the hex the bridge is being raised in
      turnsWorked - the turns of structure currently standing (0 to turnsRequired)
      turnsRequired - the total turns of work a finished bridge needs (the denominator)
      exits - exits bitmask of the two hexsides the finished bridge will connect
    • BridgeBuildSprite

      public BridgeBuildSprite(BoardView boardView, Coords location, int turnsWorked, int turnsRequired, int exits, boolean hazardOutline)
      Creates a new bridge indicator sprite, optionally ringed with a bold yellow/black hazard outline. A short-lived indicator (such as a one-turn Bridge-Layer deployment, whose ghost is easy to overlook - colour-blind players in particular flagged it as hard to see) uses the outline so the target hex is unmistakable; the multi-turn engineer build leaves it off and relies on its growing ghost.
      Parameters:
      boardView - the parent board view
      location - the hex the bridge is being raised in
      turnsWorked - the turns of structure currently standing (0 to turnsRequired)
      turnsRequired - the total turns of work a finished bridge needs (the denominator)
      exits - exits bitmask of the two hexsides the finished bridge will connect
      hazardOutline - whether to ring the hex with a high-visibility yellow/black hazard outline
  • Method Details

    • prepare

      public void prepare()
      Description copied from class: Sprite
      Do any necessary preparation. This is called after creation, but before drawing, when a device context is ready to draw with.
      Specified by:
      prepare in class Sprite
    • isBehindTerrain

      public boolean isBehindTerrain()
      Description copied from class: HexSprite
      Returns true when this Sprite should be hidden by overlapping terrain in isometric mode, i.e. hidden behind mountains. By default, this method returns true.
      Overrides:
      isBehindTerrain in class HexSprite
      Returns:
      True for Sprites that should be hidden by overlapping terrain in isometric mode