Package com.csse3200.game.entities
Enum Class EntityType
- All Implemented Interfaces:
Serializable
,Comparable<EntityType>
,Constable
An enum of all the entity types in the game.
Feel free to add yours here. Read Documentation for SaveLoad and follow procedure there
Changing order of EntityTypes will cause a failure in ManageHostilesQuestTest as the type order is reliant on the enum class.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionfloat
Getter method for the oxygen consumption/production rate of a given entity type.Getter for the placeableCategoryvoid
setPlaceableCategory
(PlaceableCategory placeableCategory) Setter for the placeableCategorystatic EntityType
Returns the enum constant of this class with the specified name.static EntityType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PLAYER
-
TRACTOR
-
PLANT
-
DECAYING_PLANT
-
TILE
-
COW
-
CHICKEN
-
ASTROLOTL
-
OXYGEN_EATER
-
DRAGONFLY
-
BAT
-
ITEM
-
QUESTGIVER
-
QUESTGIVER_INDICATOR
-
CHEST
-
FENCE
-
GATE
-
SPRINKLER
-
PUMP
-
LIGHT
-
SHIP
-
SHIP_DEBRIS
-
SHIP_PART_TILE
-
SHIP_EATER
-
DUMMY
-
FIRE_FLIES
-
GOLDEN_STATUE
-
-
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
-
getOxygenRate
public float getOxygenRate()Getter method for the oxygen consumption/production rate of a given entity type.- Returns:
- the hourly oxygen rate of the entity type.
-
getPlaceableCategory
Getter for the placeableCategory- Returns:
- this placeableCategory
-
setPlaceableCategory
Setter for the placeableCategory- Parameters:
placeableCategory
- A category that encompasses the Placeable type.
-