1 #ifndef CORE_COMPONENTS_PLAYERCONTROLLED_HPP
2 #define CORE_COMPONENTS_PLAYERCONTROLLED_HPP
57 virtual bool observe(
const bl::input::Actor&,
unsigned int ctrl, bl::input::DispatchType,
Core classes and functionality for both the editor and game.
Adding this component to an entity allows it to be controlled.
Add this component to an entity to make it controlled by player input.
virtual ~PlayerControlled()=default
Destroy the Player Controlled component.
PlayerControlled(system::Systems &systems, Controllable &controllable)
Construct a new Player Controlled component and immediately start taking player input....
void start()
Activate this listener and receive player input. Does not have effect if already activated but anothe...
virtual bool observe(const bl::input::Actor &, unsigned int ctrl, bl::input::DispatchType, bool) override
Forwards the player input to the underlying entity.
void stop()
Stops listening to player input.
Owns all primary systems and a reference to the engine.