Class Engine::InputManager¶
ClassList > Engine > InputManager
Central input management resource storing and updating player controllers. More...
#include <InputManager.hpp>
Public Functions¶
| Type | Name |
|---|---|
| void | AddPlayer (int playerId, std::unique_ptr< IController > controller) Associates a player ID with a specific controller device. |
| IController * | GetController (int playerId) Retrieves the controller assigned to a given player ID. |
| InputManager () |
|
| void | Update () Updates all registered controllers for the current frame. |
| ~InputManager () |
Detailed Description¶
Registered as a global resource in the ECS Registry. Polled during Application::PreUpdate to refresh all registered player controllers.
Public Functions Documentation¶
function AddPlayer¶
Associates a player ID with a specific controller device.
Parameters:
playerIdIdentifier for the player (e.g. 1, 2).controllerUnique pointer to an IController instance.
function GetController¶
Retrieves the controller assigned to a given player ID.
Parameters:
playerIdIdentifier for the player.
Returns:
Pointer to IController if found, nullptr otherwise.
function InputManager¶
function Update¶
Updates all registered controllers for the current frame.
function ~InputManager¶
The documentation for this class was generated from the following file /home/runner/work/r-type/r-type/Engine/include/Inputs/InputManager.hpp