public class Key
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
boolean |
A
If the value is set to true, then the "A" button will be pressed.
|
boolean |
B
If the value is set to true, then the "B" button will be pressed.
|
boolean |
C
If the value is set to true, then the "C" button will be pressed.
|
boolean |
D
If the value is set to true, then the "Down" button will be pressed.
|
boolean |
L
If the value is set to true, then the "Left" button will be pressed.
|
boolean |
R
If the value is set to true, then the "Right" button will be pressed.
|
boolean |
U
If the value is set to true, then the "Up" button will be pressed.
|
Constructor and Description |
---|
Key()
This constructor initializes all keys to false, or not pressed.
|
Key(Key key)
The class constructor that initializes the key with the specified data.
|
Modifier and Type | Method and Description |
---|---|
void |
empty()
Resets all keys to false, or not pressed.
|
int |
getLever(boolean isFront)
Returns the value indicating the direction key input by the player using
the numeric keypad.
|
public boolean A
public boolean B
public boolean C
public boolean U
public boolean R
public boolean D
public boolean L
public Key()
public Key(Key key)
key
- an instance of the Key classpublic void empty()
public int getLever(boolean isFront)
isFront
- the boolean value representing the player's orientation