public enum WeaponType extends java.lang.Enum<WeaponType>
Enum Constant and Description |
---|
AXE |
BOW |
DAGGER |
FIST |
MACE |
SPEAR |
SWORD |
Modifier and Type | Method and Description |
---|---|
static WeaponType |
fromName(java.lang.String type)
Converts type name to type object
|
static WeaponType |
fromOrdinal(int ordinal)
Converts ordinal to weapon type enumeration
|
java.lang.String |
getDefaultMaleSpritesheet()
Returns default male spritesheet for this weapon type
|
int |
getId()
Returns weapon type ID
|
java.lang.String |
getName()
Returns string with name of this weapon type
|
static WeaponType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static WeaponType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final WeaponType DAGGER
public static final WeaponType SWORD
public static final WeaponType AXE
public static final WeaponType MACE
public static final WeaponType SPEAR
public static final WeaponType BOW
public static final WeaponType FIST
public static WeaponType[] values()
for (WeaponType c : WeaponType.values()) System.out.println(c);
public static WeaponType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static WeaponType fromName(java.lang.String type)
type
- String with type namepublic static WeaponType fromOrdinal(int ordinal)
ordinal
- Weapon type enum ordinalpublic int getId()
public java.lang.String getName()
public java.lang.String getDefaultMaleSpritesheet()