Skip to content

Struct Engine::Input

ClassList > Engine > Input

Component linking an entity to a specific player's controller. More...

  • #include <Input.hpp>

Public Attributes

Type Name
bool isActive = true
Whether this entity is currently receiving and processing input.
int playerIdx = 1
Player identifier corresponding to an attached controller in InputManager .

Public Static Functions

Type Name
Input Create (int playerIndex=1, bool active=true)
Creates an Input component.

Detailed Description

Used by gameplay systems to identify which player controls this entity and whether the entity is currently active to receive commands.

Public Attributes Documentation

variable isActive

Whether this entity is currently receiving and processing input.

bool Engine::Input::isActive;


variable playerIdx

Player identifier corresponding to an attached controller in InputManager .

int Engine::Input::playerIdx;


Public Static Functions Documentation

function Create

Creates an Input component.

static inline Input Engine::Input::Create (
    int playerIndex=1,
    bool active=true
) 

Parameters:

  • playerIndex The player ID (default: 1).
  • active Whether the input is active (default: true).


The documentation for this class was generated from the following file /home/runner/work/r-type/r-type/Engine/include/Components/Input.hpp