diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2017-06-13 21:01:08 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2017-06-13 21:01:08 -0400 |
commit | 316df0931c66e43e69f21bda28c77b9bdb1e8bca (patch) | |
tree | d98231e4b41d046a2a60ee9c6f1cc724a9e3837d /include/systems | |
parent | 11b8e727e04ed6095164bb826541409f88047625 (diff) |
component reorginization; entity flashes
Diffstat (limited to 'include/systems')
-rw-r--r-- | include/systems/dialog.hpp | 16 | ||||
-rw-r--r-- | include/systems/movement.hpp | 11 | ||||
-rw-r--r-- | include/systems/physics.hpp | 11 | ||||
-rw-r--r-- | include/systems/render.hpp | 23 |
4 files changed, 61 insertions, 0 deletions
diff --git a/include/systems/dialog.hpp b/include/systems/dialog.hpp new file mode 100644 index 0000000..407f043 --- /dev/null +++ b/include/systems/dialog.hpp @@ -0,0 +1,16 @@ +#ifndef SYSTEM_DIALOG_HPP_ +#define SYSTEM_DIALOG_HPP_ + +#include <entityx/entityx.h> + +#include <events.hpp> + +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 // SYSTEM_DIALOG_HPP_ diff --git a/include/systems/movement.hpp b/include/systems/movement.hpp new file mode 100644 index 0000000..fd37665 --- /dev/null +++ b/include/systems/movement.hpp @@ -0,0 +1,11 @@ +#ifndef SYSTEM_MOVEMENT_HPP_ +#define SYSTEM_MOVEMENT_HPP_ + +#include <entityx/entityx.h> + +class MovementSystem : public entityx::System<MovementSystem> { +public: + void update(entityx::EntityManager &en, entityx::EventManager &ev, entityx::TimeDelta dt) override; +}; + +#endif // SYSTEM_MOVEMENT_HPP_ diff --git a/include/systems/physics.hpp b/include/systems/physics.hpp new file mode 100644 index 0000000..9fd6981 --- /dev/null +++ b/include/systems/physics.hpp @@ -0,0 +1,11 @@ +#ifndef SYSTEM_PHYSICS_HPP_ +#define SYSTEM_PHYSICS_HPP_ + +#include <entityx/entityx.h> + +class PhysicsSystem : public entityx::System<PhysicsSystem> { +public: + void update(entityx::EntityManager &en, entityx::EventManager &ev, entityx::TimeDelta dt) override; +}; + +#endif // SYSTEM_PHYSICS_HPP_ diff --git a/include/systems/render.hpp b/include/systems/render.hpp new file mode 100644 index 0000000..012c6fd --- /dev/null +++ b/include/systems/render.hpp @@ -0,0 +1,23 @@ +#ifndef SYSTEM_RENDER_HPP_ +#define SYSTEM_RENDER_HPP_ + +#include <entityx/entityx.h> + +#include <texture.hpp> + +#include <string> + +class RenderSystem : public entityx::System<RenderSystem> { +private: + static std::string loadTexString; + static Texture loadTexResult; + +public: + static Texture loadTexture(const std::string& file); + static void render(void); + + void update(entityx::EntityManager &en, entityx::EventManager &ev, entityx::TimeDelta dt) override; +}; + + +#endif // SYSTEM_RENDER_HPP_ |