public enum ActionResult extends Enum<ActionResult>
Enum Constant and Description |
---|
CONSUME
Indicates an action is performed but no animation should accompany the
performance.
|
FAIL
Indicates that an action is not performed and prevents other actions
from performing.
|
PASS
Indicates an action is not performed but allows other actions to
perform.
|
SUCCESS
Indicates an action is performed and the actor's hand should swing to
indicate the performance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isAccepted()
Returns whether an action is performed.
|
boolean |
shouldSwingHand()
Returns whether an actor should have a hand-swinging animation on
action performance.
|
static ActionResult |
success(boolean swingHand) |
static ActionResult |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ActionResult[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ActionResult SUCCESS
public static final ActionResult CONSUME
public static final ActionResult PASS
public static final ActionResult FAIL
public static ActionResult[] values()
for (ActionResult c : ActionResult.values()) System.out.println(c);
public static ActionResult valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isAccepted()
public boolean shouldSwingHand()
public static ActionResult success(boolean swingHand)