|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.esw.eengine.fsm.FSM
public class FSM
Implementation of a deterministic finite state machine (FSM/FSA).
update(float, Object)| Constructor Summary | |
|---|---|
FSM()
|
|
FSM(State startState)
|
|
| Method Summary | |
|---|---|
State |
getStartState()
|
void |
reset()
Resets this finite state machine to the startState State
given during construction. |
void |
setStartState(State startState)
|
void |
start()
Enters the start state of the FSM |
void |
start(java.lang.Object input)
Enters the start state of the FSM |
void |
update(float delta)
|
void |
update(float delta,
java.lang.Object input)
Triggers always the first Transition returned by the
current state. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FSM()
public FSM(State startState)
startState - Start State for this FSM| Method Detail |
|---|
public void update(float delta)
throws EEngineException
delta - Delta time since last call
EEngineException - Thrown if no startState State is definedIUpdateable.update(float)
public void update(float delta,
java.lang.Object input)
throws EEngineException
Transition returned by the
current state. Therefore this is considered as deterministic behaviour
even if there are more than one possible Transitions to be
triggered. For nondeterministic behaviour override this class with some
scheme you want for Transition selection.
delta - Delta time since last callinput - Generic input object for process method
EEngineException - Thrown if no startState State is definedpublic void start()
public void start(java.lang.Object input)
input - Generic input object for start statepublic void reset()
State
given during construction.
public final State getStartState()
public final void setStartState(State startState)
startState - The startState to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||