Package rea.gaming
Enum Class Action
- All Implemented Interfaces:
Serializable
,Comparable<Action>
,Constable
The actions that the player can do in the game.
- Author:
- José Paulo Leal
jpleal@fc.up.pt
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMove to the previous place.Drop an item from the inventory to the scene.Hold an item, either from the inventory or from the scene, to then use it.Look at the selected object in the scene to receive its description.Move to another position in the same place, or to a different place.Pick an item from the scene and save it in the inventory.Talk to every character in the scene.Use the item your holding on the seleted object in the scene. -
Method Summary
-
Enum Constant Details
-
MOVE
Move to another position in the same place, or to a different place. -
BACK
Move to the previous place. -
PICK
Pick an item from the scene and save it in the inventory. -
DROP
Drop an item from the inventory to the scene. -
HOLD
Hold an item, either from the inventory or from the scene, to then use it. -
USE
Use the item your holding on the seleted object in the scene. -
TALK
Talk to every character in the scene. -
LOOK
Look at the selected object in the scene to receive its description.
-
-
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
-
getTitle
Get the action name as a title. The first letter is capitalized and the following letters are in lower case. (e.g. "Move" forMOVE
).- Returns:
- the title of the action.
-