diff options
-rw-r--r-- | include/entities.h | 3 | ||||
-rw-r--r-- | src/entities.cpp | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/include/entities.h b/include/entities.h index 4c1b484..e579355 100644 --- a/include/entities.h +++ b/include/entities.h @@ -59,9 +59,8 @@ public: }; class NPC : public Entity{ -private: - std::vector<int (*)(NPC *)>aiFunc; public: + std::vector<int (*)(NPC *)>aiFunc; NPC(); void addAIFunc(int (*func)(NPC *)); void interact(); diff --git a/src/entities.cpp b/src/entities.cpp index d5328f0..43c7bf3 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -22,6 +22,10 @@ void Entity::spawn(float x, float y){ //spawns the entity you pass to it based o void Entity::draw(void){ //draws the entities if(type==NPCT){ + if(NPCp(this)->aiFunc.size()){ + glColor3ub(255,255,0); + glRectf(loc.x,loc.y+height+HLINE,loc.x+width,loc.y+height+HLINE*5); + } if(gender == MALE) glColor3ub(0,0,100); else if(gender == FEMALE) |