diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2016-05-18 08:17:59 -0400 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2016-05-18 08:17:59 -0400 |
commit | 72941038ae15ed524e2a878d087d98bc97e946b4 (patch) | |
tree | c5609ec3994c5d993d1589696cd886a9592708dc /include/mob.hpp | |
parent | d27a975710cf7ef02f755ef768f133e19df69fa5 (diff) | |
parent | e1def1b4167156da12fa30baac3b3ccc2d00d74c (diff) |
Z INDEXING
Diffstat (limited to 'include/mob.hpp')
-rw-r--r-- | include/mob.hpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/mob.hpp b/include/mob.hpp index 00cd396..4425159 100644 --- a/include/mob.hpp +++ b/include/mob.hpp @@ -1,6 +1,9 @@ #ifndef MOB_H_ #define MOB_H_ +#include <forward_list> +#include <tuple> + #include <common.hpp> #include <entities.hpp> #include <gametime.hpp> @@ -13,8 +16,12 @@ using namespace tinyxml2; extern Player *player; extern std::string currentXML; +using Drop = std::tuple<std::string, unsigned int, float>; + class Mob : public Entity { protected: + std::forward_list<Drop> drop; + unsigned int actCounter; unsigned int actCounterInitial; bool ridable; @@ -29,6 +36,10 @@ public: void wander(void); void ride(Entity *e); virtual void act(void) =0; + + virtual void onHit(unsigned int) =0; + virtual void onDeath(void); + virtual bool bindTex(void) =0; virtual void createFromXML(const XMLElement *e) =0; }; @@ -46,6 +57,7 @@ public: Page(void); void act(void); + void onHit(unsigned int); bool bindTex(void); void createFromXML(const XMLElement *e); }; @@ -55,6 +67,7 @@ public: Door(void); void act(void); + void onHit(unsigned int); bool bindTex(void); void createFromXML(const XMLElement *e); }; @@ -64,6 +77,7 @@ public: Cat(void); void act(void); + void onHit(unsigned int); bool bindTex(void); void createFromXML(const XMLElement *e); }; @@ -73,6 +87,7 @@ public: Rabbit(void); void act(void); + void onHit(unsigned int); bool bindTex(void); void createFromXML(const XMLElement *e); }; @@ -84,6 +99,7 @@ public: Bird(void); void act(void); + void onHit(unsigned int); bool bindTex(void); void createFromXML(const XMLElement *e); }; @@ -96,6 +112,7 @@ public: Trigger(void); void act(void); + void onHit(unsigned int); bool bindTex(void); void createFromXML(const XMLElement *e); }; |