diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2016-10-28 09:18:53 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2016-10-28 09:18:53 -0400 |
commit | ed10ef9ede3d397672239c3b3dbe42cc6fbe56b4 (patch) | |
tree | 8899b84ca035513550f097c6af3fc236f6bd8be8 /include/components.hpp | |
parent | 816bedbd011b6729e8be0a4b40213f48fd9d73ca (diff) |
npc dialog
Diffstat (limited to 'include/components.hpp')
-rw-r--r-- | include/components.hpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/include/components.hpp b/include/components.hpp index 1195337..474a0eb 100644 --- a/include/components.hpp +++ b/include/components.hpp @@ -12,6 +12,7 @@ #include <entityx/entityx.h> #include <common.hpp> #include <texture.hpp> +#include <events.hpp> /** * @struct Position @@ -220,25 +221,37 @@ struct Visible { float z; /**< The value along the z axis the entity will be drawn on */ }; +struct Dialog { + Dialog(int idx = 0) + : index(idx) {} + + int index; +}; + /** * SYSTEMS */ class MovementSystem : public entityx::System<MovementSystem> { -private: public: void update(entityx::EntityManager &en, entityx::EventManager &ev, entityx::TimeDelta dt) override; }; class PhysicsSystem : public entityx::System<PhysicsSystem> { -private: public: - void update(entityx::EntityManager &en, entityx::EventManager &ev, entityx::TimeDelta dt); + void update(entityx::EntityManager &en, entityx::EventManager &ev, entityx::TimeDelta dt) override; }; + class RenderSystem : public entityx::System<RenderSystem> { -private: public: void update(entityx::EntityManager &en, entityx::EventManager &ev, entityx::TimeDelta dt) override; }; +class DialogSystem : public entityx::System<DialogSystem>, public entityx::Receiver<DialogSystem> { +public: + void configure(entityx::EventManager&); + void receive(const MouseClickEvent&); + void update(entityx::EntityManager&, entityx::EventManager&, entityx::TimeDelta) override; +}; + #endif //COMPONENTS_HPP |