rl.common.game.elements
Class VehicleCrew
java.lang.Object
rl.common.game.elements.GameElement
rl.common.game.elements.VehicleCrew
- All Implemented Interfaces:
- java.io.Serializable, MovementCapableElement
public class VehicleCrew
- extends GameElement
- implements MovementCapableElement
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
StatusNames
public static final java.lang.String[] StatusNames
VehicleCrew
public VehicleCrew()
isGravElement
public boolean isGravElement()
setName
public void setName(java.lang.String name)
getName
public java.lang.String getName()
- Specified by:
getName in class GameElement
getCommanderStatus
public VehicleCrew.Status getCommanderStatus()
setCommanderStatus
public void setCommanderStatus(VehicleCrew.Status status)
getDriverStatus
public VehicleCrew.Status getDriverStatus()
setDriverStatus
public void setDriverStatus(VehicleCrew.Status status)
getGunnerStatus
public VehicleCrew.Status getGunnerStatus()
setGunnerStatus
public void setGunnerStatus(VehicleCrew.Status status)
getElementType
public java.lang.String getElementType()
- Specified by:
getElementType in class GameElement
getDriverRating
public int getDriverRating()
setDriverRating
public void setDriverRating(int rating)
getGunneryRating
public int getGunneryRating()
setGunneryRating
public void setGunneryRating(int rating)
calculateStatus
public GameElementDamageSummary calculateStatus(int turn,
GameElement.StatusPhase phase)
- Specified by:
calculateStatus in class GameElement
applyDamageSummary
public void applyDamageSummary(GameElementDamageSummary geds)
- Specified by:
applyDamageSummary in class GameElement
canMove
public boolean canMove()
canFire
public boolean canFire()
isDestroyed
public boolean isDestroyed(int turn)
- Specified by:
isDestroyed in class GameElement
hasInternalStructure
public boolean hasInternalStructure()
- Specified by:
hasInternalStructure in class GameElement
getDamageSummary
public double getDamageSummary(int turn)
- Specified by:
getDamageSummary in class GameElement
getInternalDamageSummary
public double getInternalDamageSummary(int turn)
- Specified by:
getInternalDamageSummary in class GameElement
canMove
public boolean canMove(int turn)
- Description copied from interface:
MovementCapableElement
- returns whether the element can move in a given turn
- Specified by:
canMove in interface MovementCapableElement
- Returns:
- whether the element is capable of being moved on the turn supplied
hasMoved
public boolean hasMoved(int turn)
- Description copied from interface:
MovementCapableElement
- returns whether a unit has moved in a given turn
- Specified by:
hasMoved in interface MovementCapableElement
- Returns:
- if the element has moved on the turn supplied
setMoved
public void setMoved(int turn)
- Description copied from interface:
MovementCapableElement
- sets the status of an element that has moved in a given turn
- Specified by:
setMoved in interface MovementCapableElement
getMovementSummary
public GameElementMovementSummary getMovementSummary(int turn)
- Description copied from interface:
MovementCapableElement
- return a new GameElementMovementSummary appropriate for the element implementing this interface
- Specified by:
getMovementSummary in interface MovementCapableElement
applyMovementSummary
public void applyMovementSummary(GameElementMovementSummary gems)
- Description copied from interface:
MovementCapableElement
- applies the summary of movement to the element. This is to provide a synch between the element
on the server and the one on the client.
- Specified by:
applyMovementSummary in interface MovementCapableElement