Peoplemon  0.1.0
Peoplemon 3 game source documentation
Public Member Functions | List of all members
core::system::Controllable Class Reference

Simple systems for performing batch locks and unlocks on all controllable entities. More...

#include <Controllable.hpp>

Public Member Functions

 Controllable (Systems &owner)
 Construct a new Controllable systems. More...
 
bool setEntityLocked (bl::ecs::Entity entity, bool locked, bool preserve=true)
 Set the give entity to be locked or unlocked. More...
 
bool resetEntityLock (bl::ecs::Entity entity)
 Resets the given entity's lock state to the last remembered value. More...
 
void setAllLocks (bool locked, bool preserve=true)
 Sets the lock state for all controllable entities. More...
 
void resetAllLocks ()
 Resets all controllable entity locks to the last stored state. More...
 

Detailed Description

Simple systems for performing batch locks and unlocks on all controllable entities.

Definition at line 19 of file Controllable.hpp.

Constructor & Destructor Documentation

◆ Controllable()

core::system::Controllable::Controllable ( Systems owner)

Construct a new Controllable systems.

Parameters
ownerThe primary systems object

Definition at line 10 of file Controllable.cpp.

Member Function Documentation

◆ resetAllLocks()

void core::system::Controllable::resetAllLocks ( )

Resets all controllable entity locks to the last stored state.

Definition at line 40 of file Controllable.cpp.

◆ resetEntityLock()

bool core::system::Controllable::resetEntityLock ( bl::ecs::Entity  entity)

Resets the given entity's lock state to the last remembered value.

Parameters
entityThe entity to reset
Returns
True on reset, false if not found

Definition at line 26 of file Controllable.cpp.

◆ setAllLocks()

void core::system::Controllable::setAllLocks ( bool  locked,
bool  preserve = true 
)

Sets the lock state for all controllable entities.

Parameters
lockedTrue to lock, false to unlock
preserveTrue to remember previous lock state, false to ignore

Definition at line 35 of file Controllable.cpp.

◆ setEntityLocked()

bool core::system::Controllable::setEntityLocked ( bl::ecs::Entity  entity,
bool  locked,
bool  preserve = true 
)

Set the give entity to be locked or unlocked.

Parameters
entityThe entity to change the state of
lockedTrue to lock, false to unlock
preserveTrue to preserve previous lock state, false to forget
Returns
True if lock applied, false if not found

Definition at line 13 of file Controllable.cpp.


The documentation for this class was generated from the following files: