![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Add this component to an entity to make it controlled by player input. More...
#include <PlayerControlled.hpp>
Public Member Functions | |
PlayerControlled (system::Systems &systems, Controllable &controllable) | |
Construct a new Player Controlled component and immediately start taking player input. Whatever was previously receiving player input is cut off. More... | |
virtual | ~PlayerControlled ()=default |
Destroy the Player Controlled component. More... | |
void | start () |
Activate this listener and receive player input. Does not have effect if already activated but another input listener has taken precedence. More... | |
void | stop () |
Stops listening to player input. More... | |
virtual bool | observe (const bl::input::Actor &, unsigned int ctrl, bl::input::DispatchType, bool) override |
Forwards the player input to the underlying entity. More... | |
Add this component to an entity to make it controlled by player input.
Definition at line 22 of file PlayerControlled.hpp.
core::component::PlayerControlled::PlayerControlled | ( | system::Systems & | systems, |
Controllable & | controllable | ||
) |
Construct a new Player Controlled component and immediately start taking player input. Whatever was previously receiving player input is cut off.
systems | The primary systems object |
controllable | The controllable component to interface with |
Definition at line 10 of file PlayerControlled.cpp.
|
virtualdefault |
Destroy the Player Controlled component.
|
overridevirtual |
Forwards the player input to the underlying entity.
ctrl | The input to forward |
Definition at line 27 of file PlayerControlled.cpp.
void core::component::PlayerControlled::start | ( | ) |
Activate this listener and receive player input. Does not have effect if already activated but another input listener has taken precedence.
Definition at line 15 of file PlayerControlled.cpp.
void core::component::PlayerControlled::stop | ( | ) |
Stops listening to player input.
Definition at line 22 of file PlayerControlled.cpp.