public abstract class RobotMode
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private GameMode |
m_mode
The m_mode.
|
private java.lang.String |
m_name
The m_name.
|
| Modifier | Constructor and Description |
|---|---|
protected |
RobotMode()
Instantiates a new robot mode.
|
protected |
RobotMode(GameMode mode)
Instantiates a new robot mode.
|
protected |
RobotMode(GameMode mode,
java.lang.String name)
Instantiates a new robot mode.
|
protected |
RobotMode(GameMode mode,
java.lang.String name,
boolean active)
Instantiates a new robot mode.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
end()
The user end code for this mode.
|
boolean |
getActive()
Get if this RobotMode is the active one for its
GameMode. |
GameMode |
getModeType()
Get the mode type for this robot mode.
|
java.lang.String |
getName()
Gets the name.
|
protected void |
init()
The user initialization code for this mode.
|
protected void |
modeEnd()
GameMode Specific end code.
|
protected void |
modeInit()
GameMode Specific init code.
|
protected void |
modeRun()
GameMode Specific run code.
|
protected void |
run()
The user run code for this mode.
|
void |
setActive()
Set this RobotMode as the active robot mode for its
GameMode. |
private final GameMode m_mode
private final java.lang.String m_name
protected RobotMode()
protected RobotMode(GameMode mode)
mode - the modeprotected RobotMode(GameMode mode, java.lang.String name)
mode - the modename - the nameprotected RobotMode(GameMode mode, java.lang.String name, boolean active)
mode - the modename - the nameactive - the activepublic final java.lang.String getName()
public final GameMode getModeType()
public final boolean getActive()
GameMode.GameModepublic final void setActive()
GameMode.protected void modeInit()
init() method when the mode changes.protected void init()
run() is run.protected void modeRun()
run() method once every period.protected void run()
protected void modeEnd()
end() method when the mode changes.protected void end()