Input actions.
More...
#include <Input.hpp>
Input actions.
Input is made to know action of input while game is running
◆ AxisDetectMode
◆ __update()
| void KapEngine::Events::Input::__update |
( |
| ) |
|
update inputs
- Warning
- Do not call this function
◆ addAxis() [1/2]
| void KapEngine::Events::Input::addAxis |
( |
Axis const & |
axis | ) |
|
|
inline |
add new axis
add axis you defined
- Parameters
-
◆ addAxis() [2/2]
| void KapEngine::Events::Input::addAxis |
( |
std::string |
name | ) |
|
|
inline |
add new axis
add empty axis
- Parameters
-
◆ getAxis()
| float KapEngine::Events::Input::getAxis |
( |
std::string |
name | ) |
|
get axis value
get axis value. If axis not found then value is 0
- Parameters
-
- Returns
- float (betwenn 1 and -1)
◆ getAxisSettings()
| Axis& KapEngine::Events::Input::getAxisSettings |
( |
std::string const & |
name | ) |
|
|
inline |
◆ getKey() [1/2]
| bool KapEngine::Events::Input::getKey |
( |
Key |
key | ) |
|
input action
Knows if an action occured on a specifics input
- Parameters
-
- Return values
-
| true | if an action occured |
| false | if no action occured |
◆ getKey() [2/2]
| bool KapEngine::Events::Input::getKey |
( |
Key::EKey |
key | ) |
|
input action
Knows if an action occured on a specifics input
- Parameters
-
| key | KapEngine::Events::Key::Ekey (enum) key |
- Return values
-
| true | if an action occured |
| false | if no action occured |
◆ getKeyDown() [1/2]
| bool KapEngine::Events::Input::getKeyDown |
( |
Key |
key | ) |
|
key pressed
knows if key is just pressed
- Parameters
-
- Return values
-
| true | if action occured |
| false | if no action occured |
◆ getKeyDown() [2/2]
| bool KapEngine::Events::Input::getKeyDown |
( |
Key::EKey |
key | ) |
|
key pressed
knows if key is just pressed
- Parameters
-
| key | KapEngine::Events::Key::Ekey (enum) key |
- Return values
-
| true | if action occured |
| false | if no action occured |
◆ getKeyUp() [1/2]
| bool KapEngine::Events::Input::getKeyUp |
( |
Key |
key | ) |
|
key released
knows if key is just released
- Parameters
-
- Return values
-
| true | if an action occured |
| false | if no action occured |
◆ getKeyUp() [2/2]
| bool KapEngine::Events::Input::getKeyUp |
( |
Key::EKey |
key | ) |
|
key released
knows if key is just released
- Parameters
-
| key | KapEngine::Events::Key::Ekey (enum) key |
- Return values
-
| true | if an action occured |
| false | if no action occured |
The documentation for this class was generated from the following files:
- Library/KapEngine/KapEngine/Events/Input/Input.hpp
- Library/KapEngine/KapEngine/Events/Input/Input.cpp