Class CollapseWarningSprite
java.lang.Object
megamek.client.ui.swing.boardview.sprite.Sprite
megamek.client.ui.swing.boardview.sprite.HexSprite
megamek.client.ui.swing.boardview.sprite.CollapseWarningSprite
- All Implemented Interfaces:
ImageObserver
,Comparable<Sprite>
Represents structure CF warnings for entities during deployment
and movement phase that will collapse if the entity lands-on
or is deployed on that structure.
From TW: If a units tonnage exceeds the CF of a building
or bridge, it will collapse. (Or the sum of tonnage of stacked
units if multiple units occupy the hex)
-
Field Summary
Fields inherited from class megamek.client.ui.swing.boardview.sprite.Sprite
bounds, bv, hidden, image
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true when this Sprite should be hidden by overlapping terrain in isometric mode, i.e.void
prepare()
Do any necessary preparation.Methods inherited from class megamek.client.ui.swing.boardview.sprite.HexSprite
createNewHexImage, getPosition, updateBounds
Methods inherited from class megamek.client.ui.swing.boardview.sprite.Sprite
compareTo, drawOnto, drawOnto, equals, getBounds, getSpritePriority, getTooltip, imageUpdate, isHidden, isInside, isReady, setHidden, toString
-
Constructor Details
-
CollapseWarningSprite
- Parameters:
boardView1
- - parent BoardView object this sprite will be displayed on.loc
- - Hex location coordinates of building or bridge where warning will be visible.
-
-
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. -
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 classHexSprite
- Returns:
- True for Sprites that should be hidden by overlapping terrain in isometric mode
-