public interface State
Modifier and Type | Method and Description |
---|---|
void |
enterState(CommandPlayer context)
Called when a state is entered.
|
void |
exitState(CommandPlayer context)
Called when a state is exited.
|
void |
processModel(CommandPlayer context,
EnvironmentModel model)
Using the current game state, decide what action to take.
|
void |
updateState(StateMachine stateMachine,
EnvironmentModel model)
Decide if the players behavioural state should change, and if it
should, change it.
|
void enterState(CommandPlayer context)
context
- The agent to which this state appliesvoid exitState(CommandPlayer context)
context
- The agent to which this state appliesvoid processModel(CommandPlayer context, EnvironmentModel model)
context
- The agent to which this state appliesmodel
- Model containing the current game state.void updateState(StateMachine stateMachine, EnvironmentModel model)
stateMachine
- State Machine to update.model
- Model containing the current game state.