diff options
author | Nodmgatall <Nodmgatall@users.noreply.github.com> | 2015-06-13 21:51:38 +0200 |
---|---|---|
committer | Nodmgatall <Nodmgatall@users.noreply.github.com> | 2015-06-13 21:51:38 +0200 |
commit | 2e5e01d6d5e9f7c74ed7449e843736e08077b092 (patch) | |
tree | 7fac77f7e1518ec12270fbb725e84c842bf5dffd /README.md | |
parent | e5cf985e03c2741cfdeb0c504cc1b7b0a631d151 (diff) |
Make Receiver inheritance public instead of implicitly private
Otherwise you get an error when trying to run the example.
/home/lemling/Dokumente/Proggen/BaconGameJam/bgj09/entityx/entityx/Event.h: In instantiation of ‘void entityx::EventManager::subscribe(Receiver&) [with E = PlayerInstrucionEvent; Receiver = MovementSystem]’:
/home/lemling/Dokumente/Proggen/BaconGameJam/bgj09/src/system_movement.hpp:17:58: required from here
/home/lemling/Dokumente/Proggen/BaconGameJam/bgj09/entityx/entityx/Event.h:130:26: error: ‘entityx::BaseReceiver’ is an inaccessible base of ‘MovementSystem’
BaseReceiver &base = receiver;
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -243,7 +243,7 @@ class CollisionSystem : public System<CollisionSystem> { Objects interested in receiving collision information can subscribe to ``Collision`` events by first subclassing the CRTP class ``Receiver<T>``: ```c++ -struct DebugSystem : public System<DebugSystem>, Receiver<DebugSystem> { +struct DebugSystem : public System<DebugSystem>, public Receiver<DebugSystem> { void configure(entityx::EventManager &event_manager) { event_manager.subscribe<Collision>(*this); } |