public class SupportState extends java.lang.Object implements State
This state can lead to:
Constructor and Description |
---|
SupportState() |
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)
Dash towards go goal, unless the agent is more than 5m ahead of the ball
|
void |
updateState(StateMachine stateMachine,
EnvironmentModel model)
Go to Passive State if the ball is outside of the agent's movement range
Go to Attacking state if the agent gets the ball
Go to Defending state if the team doesnt have the ball.
|
public void enterState(CommandPlayer context)
State
enterState
in interface State
context
- The agent to which this state appliespublic void exitState(CommandPlayer context)
State
public void processModel(CommandPlayer context, EnvironmentModel model)
processModel
in interface State
context
- The context to which this state appliesmodel
- Model containing the current game state.public void updateState(StateMachine stateMachine, EnvironmentModel model)
updateState
in interface State
stateMachine
- State Machine to update.model
- Model containing the current game state.