diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2016-10-23 18:05:12 -0500 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2016-10-23 18:05:12 -0500 |
commit | 2dd2f42ff1c683331e7192b4bfb832e41543d2df (patch) | |
tree | 50a8c022ed2f38cfae462296b28cd1543e4db42c /include/inventory.hpp | |
parent | b32c68a5a4bfb06f321a1d78357c65458b24e760 (diff) |
scriptable tags, inv. system
Diffstat (limited to 'include/inventory.hpp')
-rw-r--r-- | include/inventory.hpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/inventory.hpp b/include/inventory.hpp new file mode 100644 index 0000000..fa24de4 --- /dev/null +++ b/include/inventory.hpp @@ -0,0 +1,35 @@ +#ifndef INVENTORY_HPP_ +#define INVENTORY_HPP_ + +#include <entityx/entityx.h> + +#include <components.hpp> +#include <events.hpp> + +struct Item { + GLuint icon; +}; + +using InventoryEntry = std::pair<Item, unsigned int>; + +class InventorySystem : public entityx::System<InventorySystem>, public entityx::Receiver<InventorySystem> { +private: + entityx::Entity currentItemEntity; + + std::vector<InventoryEntry> items; + unsigned int maxItemCount; + +public: + InventorySystem(unsigned int mic = 1) + : maxItemCount(mic) {} + + void configure(entityx::EventManager &ev); + + void loadIcons(void); + + void update(entityx::EntityManager &en, entityx::EventManager &ev, entityx::TimeDelta dt) override; + + void receive(const KeyDownEvent &kde); +}; + +#endif // INVENTORY_HPP_ |