Class DugInSpriteHandler
java.lang.Object
megamek.client.ui.clientGUI.boardview.spriteHandler.BoardViewSpriteHandler
megamek.client.ui.clientGUI.boardview.spriteHandler.DugInSpriteHandler
- All Implemented Interfaces:
EventListener,GameListener
Manages the dug-in trench overlay sprites on the board view (TO:AR p.106 Digging In). Creates and removes
DugInSprite instances on the hexes of infantry platoons that are digging in or dug in; the state is read from
the synced entities. The multi-turn fortified-hex build (sandbags) is handled separately by
FortifyBuildSpriteHandler.-
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.voidvoidvoidOverride 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 dug-in trench sprites from the current entity states: one trench overlay on the hex of every infantry platoon that is digging in (faint) or dug in (full).Methods inherited from class megamek.client.ui.clientGUI.boardview.spriteHandler.BoardViewSpriteHandler
clear, gameBoardChanged, 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
-
DugInSpriteHandler
-
-
Method Details
-
updateDugInSprites
public void updateDugInSprites()Rebuilds the dug-in trench sprites from the current entity states: one trench overlay on the hex of every infantry platoon that is digging in (faint) or dug in (full). -
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
-