|
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. More...
|
|
◆ SkidControl
The skidding control state: SC_NONE: not pressed; SC_NO_DIRECTION: pressed, but no steering; SC_LEFT/RIGHT: pressed in the specified direction.
◆ getAccel()
float KartControl::getAccel |
( |
| ) |
const |
|
inline |
Returns current acceleration in [0, 1].
◆ getBrake()
bool KartControl::getBrake |
( |
| ) |
const |
|
inline |
Returns if the kart is braking.
◆ getButtonsCompressed()
char KartControl::getButtonsCompressed |
( |
| ) |
const |
|
inline |
Compresses all buttons into a single byte.
◆ getFire()
bool KartControl::getFire |
( |
| ) |
const |
|
inline |
Returns if fire is selected.
◆ getLookBack()
bool KartControl::getLookBack |
( |
| ) |
const |
|
inline |
Returns if the kart wants to look back (which also implies that it will fire backwards.
◆ getNitro()
bool KartControl::getNitro |
( |
| ) |
const |
|
inline |
Returns if the kart activates nitro.
◆ getRescue()
bool KartControl::getRescue |
( |
| ) |
const |
|
inline |
Returns true if the kart triggered rescue.
◆ getSkidControl()
Returns the skidding control state: SC_NONE: not pressed; SC_NO_DIRECTION: pressed, but no steering; SC_LEFT/RIGHT: pressed in the specified direction.
◆ getSteer()
float KartControl::getSteer |
( |
| ) |
const |
|
inline |
Returns the current steering value in [-1, 1].
◆ reset()
void KartControl::reset |
( |
| ) |
|
|
inline |
◆ rewindTo()
Restores this object from a previously saved memory buffer.
◆ saveState()
Copies the important data from this objects into a memory buffer.
◆ setAccel()
void KartControl::setAccel |
( |
float |
f | ) |
|
◆ setBrake()
void KartControl::setBrake |
( |
bool |
b | ) |
|
Sets if the kart is braking.
◆ setButtonsCompressed()
void KartControl::setButtonsCompressed |
( |
char |
c | ) |
|
|
inline |
Sets the buttons from a compressed (1 byte) representation.
/param c Character containing the compressed representation.
◆ setFire()
void KartControl::setFire |
( |
bool |
b | ) |
|
Sets if the kart wants to fire.
◆ setLookBack()
void KartControl::setLookBack |
( |
bool |
b | ) |
|
Sets if the kart wants to look (and therefore also fires) backwards.
◆ setNitro()
void KartControl::setNitro |
( |
bool |
b | ) |
|
Sets if the kart activates nitro.
◆ setRescue()
void KartControl::setRescue |
( |
bool |
b | ) |
|
Returns if this kart wants to get rescued.
◆ setSkidControl()
Sets the skid control for this kart.
◆ setSteer()
void KartControl::setSteer |
( |
float |
f | ) |
|
Sets the current steering value.
◆ m_accel
uint16_t KartControl::m_accel |
|
private |
Acceleration, in [0, 65535].
◆ m_brake
bool KartControl::m_brake |
|
private |
◆ m_fire
True if fire is selected.
◆ m_look_back
bool KartControl::m_look_back |
|
private |
True if the kart looks (and shoots) backwards.
◆ m_nitro
bool KartControl::m_nitro |
|
private |
True if the kart activates nitro.
◆ m_rescue
bool KartControl::m_rescue |
|
private |
True if rescue is selected.
◆ m_skid
◆ m_steer
int16_t KartControl::m_steer |
|
private |
The current steering value in [-32767, 32767].
The documentation for this class was generated from the following files: