1 #ifndef CORE_COMPONENTS_CONTROLLABLE_HPP
2 #define CORE_COMPONENTS_CONTROLLABLE_HPP
41 bool overrideLock =
false);
50 void setLocked(
bool lock,
bool preserve =
true);
65 bl::ecs::Entity owner;
Core classes and functionality for both the editor and game.
std::underlying_type_t< Control::EntityControl > EntityControl
Helper typedef to avoid too much casting boilerplate.
Adding this component to an entity allows it to be controlled.
void setLocked(bool lock, bool preserve=true)
Locks the controllable and prevents any commands from being processed. Optionally remembers the previ...
void resetLock()
Resets the lock state back to the last preserved state.
bool processControl(input::EntityControl command, bool sprint=false, bool overrideLock=false)
Processes the given command and manipulates the entity accordingly.
bool isLocked() const
Returns whether or not this component is locked.
Controllable(system::Systems &systems, bl::ecs::Entity owner)
Construct a new Controllable component.
Owns all primary systems and a reference to the engine.