Package megamek.common.actions.sbf
Class AbstractSBFAttackAction
java.lang.Object
megamek.common.actions.sbf.AbstractSBFAttackAction
- All Implemented Interfaces:
- Serializable,- EntityAction,- SBFAction,- SBFAttackAction
- Direct Known Subclasses:
- SBFArtilleryAttack,- SBFStandardUnitAttack,- SBFUnitToHexAttack
public abstract class AbstractSBFAttackAction
extends Object
implements SBFAttackAction, Serializable
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface megamek.common.actions.EntityActiontoAccessibilityDescription, toSummaryStringMethods inherited from interface megamek.common.actions.sbf.SBFActiongetHandler, isDataValid
- 
Constructor Details- 
AbstractSBFAttackActionpublic AbstractSBFAttackAction(int entityId, int targetId) 
 
- 
- 
Method Details- 
getEntityIdpublic int getEntityId()- Specified by:
- getEntityIdin interface- EntityAction
- 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.
 
- 
getTargetIdpublic int getTargetId()- Specified by:
- getTargetIdin interface- SBFAttackAction
- Returns:
- The game ID of the target of the attack
 
- 
toString
 
-