]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
quest lights
authorClyne Sullivan <tullivan99@gmail.com>
Mon, 5 Oct 2015 11:30:11 +0000 (07:30 -0400)
committerClyne Sullivan <tullivan99@gmail.com>
Mon, 5 Oct 2015 11:30:11 +0000 (07:30 -0400)
include/entities.h
src/entities.cpp

index 4c1b4849832a5693386d41dadf25f777bb1f627d..e579355346fda266d025cebd738967aeda3393e1 100644 (file)
@@ -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();
index d5328f0303a398368b4bf807c45adf5819a04f42..43c7bf3597cf0e7df927300da6a4b4b55a121e6e 100644 (file)
@@ -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)