Enum Class FirearmType
- All Implemented Interfaces:
Serializable,Comparable<FirearmType>,Constable
This class highlights the different types a Firearm can have.
So there are 2 different firearm actions, OPEN and CLOSE. These actions are triggered based on weapon shooting and reloading. Comments on each type describe when the firearm opens and closes based on those 2 triggers.
Some types also have aliases, REVOLVER and BREAK, for example. This is
because these types are called different things by different people.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFirearmType for bolt action and lever action rifles Shoot: Bang, then open, (bullet goes in), then close Reload: If Empty: Open, reload timer, then close Else: Reload timer Open: Pull lever back Close: Push lever forwardFirearmType for pump shotguns Shoot: Bang, then open, then close Reload: If Empty: Reload timer, then open, then close Else: Reload timer Open: Pull the pump Close: Push the pumpFirearmType for revolvers Shoot: Bang Reload: Open, then reload timer, then close Open: Empty shells fall out Close: The block and spin of barrelFirearmType Shoot: Bang Reload: If Empty: Open, then reload timer, then close Else: Reload timer Open: Pull slide back Close: Slide returns, a bullet is chambered -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic FirearmTypeReturns the enum constant of this class with the specified name.static FirearmType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
REVOLVER
FirearmType for revolvers Shoot: Bang Reload: Open, then reload timer, then close Open: Empty shells fall out Close: The block and spin of barrel -
PUMP
FirearmType for pump shotguns Shoot: Bang, then open, then close Reload: If Empty: Reload timer, then open, then close Else: Reload timer Open: Pull the pump Close: Push the pump -
LEVER
FirearmType for bolt action and lever action rifles Shoot: Bang, then open, (bullet goes in), then close Reload: If Empty: Open, reload timer, then close Else: Reload timer Open: Pull lever back Close: Push lever forward -
SLIDE
FirearmType Shoot: Bang Reload: If Empty: Open, then reload timer, then close Else: Reload timer Open: Pull slide back Close: Slide returns, a bullet is chambered
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
hasShootActions
public boolean hasShootActions()
-