Modifier | Constructor and Description |
---|---|
protected |
StateGame(Enum<?> state)
Create the state.
|
Modifier and Type | Method and Description |
---|---|
void |
addTransition(StateTransition transition)
Add a transition with another state.
|
Enum<?> |
checkTransitions(InputDevice input)
Check the transitions in order to find the next state.
|
void |
clearTransitions()
Clear all transitions defined.
|
void |
exit()
Called by the
StateHandler when exiting the state. |
Enum<?> |
getState()
Get the corresponding state enum value.
|
protected StateGame(Enum<?> state)
state
- The corresponding enum.LionEngineException
- If null
argument.public final void addTransition(StateTransition transition)
State
addTransition
in interface State
transition
- The transition to add.public final void clearTransitions()
State
clearTransitions
in interface State
public void exit()
StateHandler
when exiting the state.
Does nothing by default. Can be overridden.
public Enum<?> checkTransitions(InputDevice input)
State
checkTransitions
in interface State
input
- The input device reference.null
if none).Copyright © 2017 Byron 3D Games Studio. All rights reserved.