aboutsummaryrefslogtreecommitdiffstats
path: root/include/entities.h
diff options
context:
space:
mode:
authorAndy Belle-Isle <abelleisle@roadrunner.com>2015-09-14 11:51:05 -0400
committerAndy Belle-Isle <abelleisle@roadrunner.com>2015-09-14 11:51:05 -0400
commit7d974f6f4d54b3fbea99780ddf6e395b217065bc (patch)
treeb9d8fe2166eedc57137737091c08cd7bbd749ddf /include/entities.h
parentd2d334f2cd3cc78f088f429eb5d0037268366e6d (diff)
Added NPC Stuff
Added Wandering, and variable spawning amounts
Diffstat (limited to 'include/entities.h')
-rw-r--r--include/entities.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/entities.h b/include/entities.h
index 752908b..2ed97ee 100644
--- a/include/entities.h
+++ b/include/entities.h
@@ -3,6 +3,8 @@
#include <common.h>
+extern int npcAmt;
+
class Entity{
public:
float width;
@@ -11,10 +13,14 @@ public:
int type, subtype;
vec2 loc;
vec2 vel;
- bool right,left;
+ bool right,left, canMove;
+ bool alive;
void spawn(float, float);
void draw(void);
+ void wander(int, vec2*);
+private:
+ int ticksToUse;
};
class Player : public Entity{
@@ -27,8 +33,8 @@ public:
NPC();
};
-extern Entity *entnpc[10]; //The NPC base
-extern NPC npc[10];
+extern Entity *entnpc[32]; //The NPC base
+extern NPC npc[32];
class Structures : public Entity{
public: