11 : ecs(owner.engine().ecs()) {}
16 BL_LOG_INFO <<
"Locked entity " << e;
21 BL_LOG_ERROR <<
"Failed to lock entity: " << e;
Core classes and functionality for both the editor and game.
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 setEntityLocked(bl::ecs::Entity entity, bool locked, bool preserve=true)
Set the give entity to be locked or unlocked.
Controllable(Systems &owner)
Construct a new Controllable systems.
bool resetEntityLock(bl::ecs::Entity entity)
Resets the given entity's lock state to the last remembered value.
void resetAllLocks()
Resets all controllable entity locks to the last stored state.
void setAllLocks(bool locked, bool preserve=true)
Sets the lock state for all controllable entities.
Owns all primary systems and a reference to the engine.