Class AbstractWreckSprite

java.lang.Object
megamek.client.ui.clientGUI.boardview.sprite.Sprite
megamek.client.ui.clientGUI.boardview.sprite.AbstractWreckSprite
All Implemented Interfaces:
ImageObserver, Comparable<Sprite>
Direct Known Subclasses:
IsometricWreckSprite, WreckSprite

public abstract class AbstractWreckSprite extends Sprite
Contains common functionality for wreck sprites (currently isometric and regular)
  • Field Details

    • entity

      protected Entity entity
    • modelRect

      protected Rectangle modelRect
    • secondaryPos

      protected int secondaryPos
  • Constructor Details

    • AbstractWreckSprite

      public AbstractWreckSprite(BoardView boardView1)
  • Method Details

    • getBounds

      public Rectangle getBounds()
      Description copied from class: Sprite
      Returns our bounding rectangle. The coordinates here are stored with the top left corner of the _board_ being 0, 0, so these do not always correspond to screen coordinates.
      Overrides:
      getBounds in class Sprite
    • getEntity

      public Entity getEntity()
    • prepare

      public void prepare()
      Creates the sprite for this entity. It is an extra pain to create transparent images in AWT.
      Specified by:
      prepare in class Sprite
    • isInside

      public boolean isInside(Point point)
      Overrides to provide for a smaller sensitive area.
      Overrides:
      isInside in class Sprite
    • getPosition

      public Coords getPosition()
    • getTooltip

      public StringBuffer getTooltip()
      Description copied from class: Sprite
      Since most sprites being drawn correspond to something in the game, this returns a little info for a tooltip.
      Overrides:
      getTooltip in class Sprite