Bubba-3D
0.9.0
Awesome game engine!
|
The class that contains information about a function at the state of creation. More...
#include <ControlStatus.h>
Public Member Functions | |
Activator | getMaxActivator () |
float | getValue () |
float | getValue (Activator activator) |
bool | isActive () |
bool | isActive (Activator activator) |
ControlStatus (Activator activator, float value) | |
void | addButton (Activator activator, float value) |
void | merge (ControlStatus cs) |
Static Public Member Functions | |
static Activator | activatorFromJoystickNumber (int n) |
The class that contains information about a function at the state of creation.
To read on how to make bindings check the documentation for ControlsManager.
Checking if a control after the bindings has been set is very simple. We will use the same bindings as given in the example in ControlsManager. The code will make sure that the vehicle does what the user wants.
Definition at line 59 of file ControlStatus.h.
ControlStatus::ControlStatus | ( | Activator | activator, |
float | value | ||
) |
Creates a ControlStatus activated by activator
with value value
.
Definition at line 30 of file ControlStatus.cpp.
ControlStatus::Activator ControlStatus::getMaxActivator | ( | ) |
Returns the activator that produced the result given by getValue() and isActive()
Definition at line 64 of file ControlStatus.cpp.
float ControlStatus::getValue | ( | ) |
Returns a number in the range [-100,100] for dual buttons. Returns a number in the range [0,100] for non-dual buttons. Returns the maximum value from any activator.
Definition at line 52 of file ControlStatus.cpp.
float ControlStatus::getValue | ( | Activator | activator | ) |
Gets the value from the specified activator. Returns a number in the range [-100,100] for dual buttons. Returns a number in the range [0,100] for non-dual buttons.
Definition at line 70 of file ControlStatus.cpp.
bool ControlStatus::isActive | ( | Activator | activator | ) |
Alias for: return abs(getValue(activator)) != 0;
Definition at line 80 of file ControlStatus.cpp.