|
| enum | SkidControl { SC_NONE
, SC_NO_DIRECTION
, SC_LEFT
, SC_RIGHT
} |
| | The skidding control state: SC_NONE: not pressed; SC_NO_DIRECTION: pressed, but no steering; SC_LEFT/RIGHT: pressed in the specified direction.
|
| |
|
|
void | setSteer (float f) |
| | Sets the current steering value.
|
| |
|
void | setAccel (float f) |
| | Sets the acceleration.
|
| |
|
void | setBrake (bool b) |
| | Sets if the kart is braking.
|
| |
|
void | setNitro (bool b) |
| | Sets if the kart activates nitro.
|
| |
|
void | setSkidControl (SkidControl sc) |
| | Sets the skid control for this kart.
|
| |
|
void | setRescue (bool b) |
| | Returns if this kart wants to get rescued.
|
| |
|
void | setFire (bool b) |
| | Sets if the kart wants to fire.
|
| |
|
void | setLookBack (bool b) |
| | Sets if the kart wants to look (and therefore also fires) backwards.
|
| |
|
void | reset () |
| | Resets all controls.
|
| |
|
bool | operator== (const KartControl &other) |
| | Tests if two KartControls are equal.
|
| |
|
void | saveState (BareNetworkString *buffer) const |
| | Copies the important data from this objects into a memory buffer.
|
| |
|
void | rewindTo (BareNetworkString *buffer) |
| | Restores this object from a previously saved memory buffer.
|
| |
|
char | getButtonsCompressed () const |
| | Compresses all buttons into a single byte.
|
| |
| void | setButtonsCompressed (char c) |
| | Sets the buttons from a compressed (1 byte) representation. More...
|
| |
|
float | getSteer () const |
| | Returns the current steering value in [-1, 1].
|
| |
|
float | getAccel () const |
| | Returns current acceleration in [0, 1].
|
| |
|
bool | getBrake () const |
| | Returns if the kart is braking.
|
| |
|
bool | getNitro () const |
| | Returns if the kart activates nitro.
|
| |
|
SkidControl | getSkidControl () const |
| | Returns the skidding control state: SC_NONE: not pressed; SC_NO_DIRECTION: pressed, but no steering; SC_LEFT/RIGHT: pressed in the specified direction.
|
| |
|
bool | getRescue () const |
| | Returns true if the kart triggered rescue.
|
| |
|
bool | getFire () const |
| | Returns if fire is selected.
|
| |
|
bool | getLookBack () const |
| | Returns if the kart wants to look back (which also implies that it will fire backwards.
|
| |
◆ setButtonsCompressed()
| void KartControl::setButtonsCompressed |
( |
char |
c | ) |
|
|
inline |
Sets the buttons from a compressed (1 byte) representation.
/param c Character containing the compressed representation.
The documentation for this class was generated from the following files: