public class ActionSwitch extends CompositeAction
m_actionsDEFAULT_STEP_TIME, INFINITY| Constructor and Description |
|---|
ActionSwitch()
Creates an empty action switch.
|
ActionSwitch(Action[] acts,
int switchVal)
Creates a new ActionSwitch with the given actions and switch value.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getSwitchValue()
Returns the current switch value, indicating the index of the Action
that will be executed in response to run() invocations.
|
void |
run(double frac)
Runs this Action, triggering whatever processing this Action performs.
|
void |
setSwitchValue(int s)
Set the switch value.
|
add, add, get, remove, remove, setVisualization, sizegetVisualization, runaddActivityListener, alwaysRunAfter, cancel, fireActivityCancelled, fireActivityFinished, fireActivityScheduled, fireActivityStarted, fireActivityStepped, getDuration, getNextTime, getPace, getPacingFunction, getStartTime, getStepTime, getStopTime, isEnabled, isRunning, isScheduled, removeActivityListener, run, runAfter, runAt, setDuration, setEnabled, setPacingFunction, setStartTime, setStepTimepublic ActionSwitch()
public ActionSwitch(Action[] acts, int switchVal)
acts - the Actions to include in this switchswitchVal - the switch value indicating which Action to runpublic void run(double frac)
Actionrun in class Actionfrac - the fraction of this Action's duration that has elapsed.Action.run(double)public int getSwitchValue()
public void setSwitchValue(int s)
s - the new switch value