public abstract class AbstractOI extends CodeThread
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractOI.Trigger |
static class |
AbstractOI.TriggerType |
Modifier and Type | Field and Description |
---|---|
static TableInterface |
table |
Constructor and Description |
---|
AbstractOI() |
Modifier and Type | Method and Description |
---|---|
static void |
addNetButton(NetButton b)
Adds a NetButton to the update list.
|
static void |
addNetJoystick(NetJoystick j)
Adds a NetJoystick to the update list.
|
void |
code()
Override this with what code you want to run in the thread.
|
static void |
deleteAllTriggers()
Deletes all the Command triggers and stops any Commands they may have started.
|
boolean |
getButtonPrevious(int index,
Button b) |
static void |
runCommand(Command c)
Adds a command to the trigger list and runs it.
|
static void |
runCommands(Command... cs)
Adds multiple commands to the trigger list and runs them.
|
void |
whenPressed(Button b,
Command c)
Makes a command run when a button is pressed.
|
void |
whenReleased(Button b,
Command c)
Makes a command run when a button is released.
|
void |
whileHeld(Button b,
Command c)
Makes a command run while a button is held.
|
public static TableInterface table
public void whenPressed(Button b, Command c)
b
- The button to trigger the command.c
- The command to be run.public void whenReleased(Button b, Command c)
b
- The button to trigger the command.c
- The command to be run.public void whileHeld(Button b, Command c)
b
- The button to trigger the command.c
- The command to be run.public static void runCommand(Command c)
c
- The command to be run.public static void runCommands(Command... cs)
cs
- The commands to be run.public static void deleteAllTriggers()
public static void addNetButton(NetButton b)
b
- The NetButton to be added.public static void addNetJoystick(NetJoystick j)
j
- The NetButton to be added.public void code()
CodeThread
code
in class CodeThread
public boolean getButtonPrevious(int index, Button b)