Class BridgeDeploySpriteHandler
java.lang.Object
megamek.client.ui.clientGUI.boardview.spriteHandler.BoardViewSpriteHandler
megamek.client.ui.clientGUI.boardview.spriteHandler.BridgeDeploySpriteHandler
- All Implemented Interfaces:
EventListener,GameListener
Manages bridge-deployment indicator sprites for Bridge-Layer (AVLB) units (TM p.242 / TW). A unit that has declared a
deployment must remain stationary for a turn before the folding bridge is placed; this handler draws a partial bridge
(with a turns-to-finish counter) on the target hex of every unit with a pending deployment, reusing the same
BridgeBuildSprite the infantry bridge build uses, so the in-progress deployment is visible just like an
engineer-built bridge. The pending state is read from the synced entities' bridgelayer mounts.-
Field Summary
Fields inherited from class megamek.client.ui.clientGUI.boardview.spriteHandler.BoardViewSpriteHandler
clientGUI, currentSprites, GUIP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Override this method to perform any clean up steps when this handler and its associated sprites are no longer needed, such as removing the handler as listener.voidvoidvoidvoidOverride this method to perform start up steps such as registering it as a listener (doing this in the constructor is considered improper as the object is not fully constructed at that point).voidRebuilds the deployment sprites from the current entity states: one partial-bridge indicator on the target hex of every unit with a pending bridgelayer deployment, growing from faint (just declared) to full (the stationary turn, about to be placed).Methods inherited from class megamek.client.ui.clientGUI.boardview.spriteHandler.BoardViewSpriteHandler
clear, gameBoardNew, gameClientFeedbackRequest, gameEnd, gameEntityNew, gameEntityNewOffboard, gameEntityRemove, gameMapQuery, gameNewAction, gamePlayerChange, gamePlayerChat, gamePlayerConnected, gamePlayerDisconnected, gameReport, gameSettingsChange, gameTurnChange, gameVictoryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface megamek.common.event.GameListener
gamePlayerStrategicAction, gameScriptedEvent, gameToast, gameUnitChange
-
Constructor Details
-
BridgeDeploySpriteHandler
-
-
Method Details
-
updateBridgeDeploySprites
public void updateBridgeDeploySprites()Rebuilds the deployment sprites from the current entity states: one partial-bridge indicator on the target hex of every unit with a pending bridgelayer deployment, growing from faint (just declared) to full (the stationary turn, about to be placed). -
initialize
public void initialize()Description copied from class:BoardViewSpriteHandlerOverride this method to perform start up steps such as registering it as a listener (doing this in the constructor is considered improper as the object is not fully constructed at that point).- Specified by:
initializein classBoardViewSpriteHandler
-
dispose
public void dispose()Description copied from class:BoardViewSpriteHandlerOverride this method to perform any clean up steps when this handler and its associated sprites are no longer needed, such as removing the handler as listener.- Specified by:
disposein classBoardViewSpriteHandler
-
gamePhaseChange
- Specified by:
gamePhaseChangein interfaceGameListener- Overrides:
gamePhaseChangein classBoardViewSpriteHandler
-
gameEntityChange
- Specified by:
gameEntityChangein interfaceGameListener- Overrides:
gameEntityChangein classBoardViewSpriteHandler
-
gameBoardChanged
- Specified by:
gameBoardChangedin interfaceGameListener- Overrides:
gameBoardChangedin classBoardViewSpriteHandler
-