IActionManager is an interface with the purpose of giving the ability to identify which actions are being performed by the player. Do not mistake this by an input manager that returns true or false if some key is pressed. An action manager should identify is a button or key has been pressed this frame, or released, or the relative value of an analog control like a joystick. The responsibility of those features comes with the implementation.
More...
#include <IActionManager.h>
|
| virtual bool | LoadActions (std::vector< char > buffer)=0 |
| virtual bool | LoadActionsFromFile (const std::string &path)=0 |
| virtual bool | HasAction (const std::string &) const =0 |
| virtual void | Update (const float &dt)=0 |
| virtual bool | Performed (const std::string &actionName) const =0 |
| virtual float | Value (const std::string &actionName) const =0 |
| virtual Vector2f | CompoundValue (const std::string &action1, const std::string &action2) const =0 |
IActionManager is an interface with the purpose of giving the ability to identify which actions are being performed by the player. Do not mistake this by an input manager that returns true or false if some key is pressed. An action manager should identify is a button or key has been pressed this frame, or released, or the relative value of an analog control like a joystick. The responsibility of those features comes with the implementation.
Actually, a single ActionManager implementation should be enough for any game, but this interface allows us to implement also VirtualActionManager, which is useful for tests. Check those two classes for more information on the implemented methods.
◆ CompoundValue()
| virtual Vector2f Mochi::Input::IActionManager::CompoundValue |
( |
const std::string & | action1, |
|
|
const std::string & | action2 ) const |
|
pure virtual |
◆ HasAction()
| virtual bool Mochi::Input::IActionManager::HasAction |
( |
const std::string & | | ) |
const |
|
pure virtual |
◆ LoadActions()
| virtual bool Mochi::Input::IActionManager::LoadActions |
( |
std::vector< char > | buffer | ) |
|
|
pure virtual |
◆ LoadActionsFromFile()
| virtual bool Mochi::Input::IActionManager::LoadActionsFromFile |
( |
const std::string & | path | ) |
|
|
pure virtual |
◆ Performed()
| virtual bool Mochi::Input::IActionManager::Performed |
( |
const std::string & | actionName | ) |
const |
|
pure virtual |
◆ Update()
| virtual void Mochi::Input::IActionManager::Update |
( |
const float & | dt | ) |
|
|
pure virtual |
◆ Value()
| virtual float Mochi::Input::IActionManager::Value |
( |
const std::string & | actionName | ) |
const |
|
pure virtual |
The documentation for this class was generated from the following file: