Package megamek.common
Class CalledShot
java.lang.Object
megamek.common.CalledShot
- All Implemented Interfaces:
Serializable
Some static methods for called shots
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetCall()isValid(Targetable target) voidreset()voidsetCall(int calledShot) Sets the called shot directly to the given location instead of stepping to it one call at a time.int
-
Field Details
-
CALLED_NONE
public static final int CALLED_NONE- See Also:
-
CALLED_HIGH
public static final int CALLED_HIGH- See Also:
-
CALLED_LOW
public static final int CALLED_LOW- See Also:
-
CALLED_LEFT
public static final int CALLED_LEFT- See Also:
-
CALLED_RIGHT
public static final int CALLED_RIGHT- See Also:
-
CALLED_NUM
public static final int CALLED_NUM- See Also:
-
-
Constructor Details
-
CalledShot
public CalledShot()
-
-
Method Details
-
getDisplayableName
-
switchCalledShot
public int switchCalledShot() -
getCall
public int getCall() -
setCall
public void setCall(int calledShot) Sets the called shot directly to the given location instead of stepping to it one call at a time. Values outside the range of the CALLED_ constants are ignored, so a malformed packet cannot leave the called shot in an unknown state.- Parameters:
calledShot- one of the CALLED_ constants, e.g.CALLED_HIGH
-
isValid
-
reset
public void reset()
-