Package model
Enum Class Types
- All Implemented Interfaces:
Serializable
,Comparable<Types>
,Constable
The Game types which are used in the game and rendered in the game
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe Assassin typeThe Barracks typeThe Barricade typeThe Castle typeThe Climber typeDelete typeThe Desert typeThe Diver typeThe Kamikaze typeThe Mountain typeThe No Select typeThe None typeThe Plains typeThe Shotgun typeThe Sniper typeThe Soldier typeThe Forest type -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Building
buildingFactory
(Types objectType, int x, int y) Factory method for creating a new Building instance.Returns the Building enum types.Returns the Soldier enum types.Returns the Tile enum types.Returns the Tower enum types.Returns the Upgradeable Tower enum types.static Soldier
soldierFactory
(Types objectType, int x, int y) Factory method for creating a new Soldier instance.static Terrain
terrainFactory
(Types objectType, ArrayList<Entity> entities) Factory method for creating a new Terrain instance.static Types
Returns the enum constant of this class with the specified name.static Types[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CASTLE
The Castle type -
BARRACKS
The Barracks type -
BARRICADE
The Barricade type -
SHOTGUN
The Shotgun type -
SNIPER
The Sniper type -
SOLDIER
The Soldier type -
ASSASSIN
The Assassin type -
KAMIKAZE
The Kamikaze type -
DIVER
The Diver type -
CLIMBER
The Climber type -
PLAINS
The Plains type -
DESERT
The Desert type -
SWAMP
The Forest type -
MOUNTAIN
The Mountain type -
NONE
The None type -
NO_SELECTION
The No Select type -
DELETE
Delete type
-
-
Field Details
-
text
String value of Enum -
color
Color value of enum
-
-
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
-
getSoldierTypes
Returns the Soldier enum types.- Returns:
- soldier types
-
getBuildingTypes
Returns the Building enum types.- Returns:
- building types
-
getTerrainTypes
Returns the Tile enum types.- Returns:
- tile types
-
getTowerTypes
Returns the Tower enum types.- Returns:
- tower types
-
getUpgradeable
Returns the Upgradeable Tower enum types.- Returns:
- upgradeable tower types
-
buildingFactory
Factory method for creating a new Building instance.- Parameters:
objectType
- the type of building to createx
- the x coordinate of the buildingy
- the y coordinate of the building- Returns:
- the new building
-
terrainFactory
Factory method for creating a new Terrain instance.- Parameters:
objectType
- the type of terrain to createentities
- the entities to add to the tile- Returns:
- the new terrain
-
soldierFactory
Factory method for creating a new Soldier instance.- Parameters:
objectType
- the type of soldier to createx
- the x coordinate of the soldiery
- the y coordinate of the soldier- Returns:
- the new soldier
-