From 7d974f6f4d54b3fbea99780ddf6e395b217065bc Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Mon, 14 Sep 2015 11:51:05 -0400 Subject: Added NPC Stuff Added Wandering, and variable spawning amounts --- include/entities.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include/entities.h') 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 +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: -- cgit v1.2.3