Peoplemon  0.1.0
Peoplemon 3 game source documentation
Controllable.hpp
Go to the documentation of this file.
1 #ifndef CORE_SYSTEMS_CONTROLLABLE_HPP
2 #define CORE_SYSTEMS_CONTROLLABLE_HPP
3 
4 #include <BLIB/ECS.hpp>
6 
7 namespace core
8 {
9 namespace system
10 {
11 class Systems;
12 
19 class Controllable {
20 public:
26  Controllable(Systems& owner);
27 
36  bool setEntityLocked(bl::ecs::Entity entity, bool locked, bool preserve = true);
37 
44  bool resetEntityLock(bl::ecs::Entity entity);
45 
52  void setAllLocks(bool locked, bool preserve = true);
53 
58  void resetAllLocks();
59 
60 private:
61  bl::ecs::Registry& ecs;
62 };
63 
64 } // namespace system
65 } // namespace core
66 
67 #endif
Core classes and functionality for both the editor and game.
Simple systems for performing batch locks and unlocks on all controllable entities.
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.
Definition: Systems.hpp:47