aboutsummaryrefslogtreecommitdiffstats
path: root/include/entities.h
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2015-09-18 17:26:28 -0400
committerClyne Sullivan <tullivan99@gmail.com>2015-09-18 17:26:28 -0400
commit6c2fa9e1b372f71d311b376e689961dad6aaa036 (patch)
tree39e8b2f07b6e04d3fb2e584ff4738150f2aa95de /include/entities.h
parenta94372de8746229705e38eea66ce42f0a1ad3dba (diff)
forgot stuff
Diffstat (limited to 'include/entities.h')
-rw-r--r--include/entities.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/include/entities.h b/include/entities.h
new file mode 100644
index 0000000..bc277cd
--- /dev/null
+++ b/include/entities.h
@@ -0,0 +1,50 @@
+#ifndef ENTITIES_H
+#define ENTITIES_H
+
+#include <common.h>
+
+extern int npcAmt;
+
+class Entity{
+public:
+ float width;
+ float height;
+ float speed;
+ int type, subtype;
+ vec2 loc;
+ vec2 vel;
+ bool right,left, canMove;
+ bool alive;
+
+ unsigned int texture[];
+
+ void spawn(float, float);
+ void draw(void);
+ void wander(int, vec2*);
+ virtual void interact(){}
+private:
+ int ticksToUse;
+};
+
+class Player : public Entity{
+public:
+ Player();
+ void interact();
+};
+
+class NPC : public Entity{
+public:
+ NPC();
+ void interact();
+};
+
+extern Entity *entnpc[32]; //The NPC base
+extern NPC npc[32];
+
+class Structures : public Entity{
+public:
+ Structures();
+ void spawn(int, float, float);
+};
+
+#endif // ENTITIES_H