Package megamek.common.actions
Class AbstractEntityAction
java.lang.Object
megamek.common.actions.AbstractEntityAction
- All Implemented Interfaces:
Serializable,EntityAction
- Direct Known Subclasses:
AbstractAttackAction,ActivateBloodStalkerAction,CallElevatorAction,ClearMinefieldAction,DirectionalMountFacingAction,DisengageAction,DodgeAction,FindClubAction,FiringModeChangeAction,FlipArmsAction,GhostTargetAction,InfantryCombatAction,NukeDetonatedAction,ReconCameraSpotAction,RepairWeaponMalfunctionAction,ScanAction,SpotAction,TorsoTwistAction,TriggerAPPodAction,TriggerBPodAction,UnjamAction,UnjamTurretAction,UnloadStrandedAction
This is a base implementation for
EntityAction.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface megamek.common.actions.EntityAction
toAccessibilityDescription, toSummaryString
-
Constructor Details
-
AbstractEntityAction
public AbstractEntityAction(int entityId)
-
-
Method Details
-
getEntityId
public int getEntityId()- Specified by:
getEntityIdin interfaceEntityAction- Returns:
- The ID of the acting game unit. Note that when an entity is destroyed, it may no longer be available from
Game.getEntity(int)but rather only fromGame.getOutOfGameEntity(int)orGame.getEntityFromAllSources(int). As this can happen in the middle of resolving complicated situations in the GameManager, this is a potential cause for bugs.
Note that this is not restricted toEntity; it can be used for allInGameObjects that are handled in the game.
-
toString
-