aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/entities.cpp3
-rw-r--r--src/main.cpp1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/entities.cpp b/src/entities.cpp
index 140223d..ab19c6f 100644
--- a/src/entities.cpp
+++ b/src/entities.cpp
@@ -84,6 +84,9 @@ unsigned int Structures::spawn(int t, float x, float y){
std::cout<<"Entity:"<<entity.size()<<std::endl;
entity[entity.size()] = &npc[npc.size()-1];
entity[entity.size()]->spawn(loc.x + (float)(i - 5) / 8,100);
+ entity[entity.size()-1]->spawn(loc.x + (float)(i - 5) / 8,100);
+ std::cout<<"Entity Type["<<entity.size()<<"]: "<<entity[entity.size()]->type<<std::endl;
+ std::cout<<"Entity Life["<<entity.size()<<"]: "<<entity[entity.size()]->alive<<std::endl;
}
return entity.size();
}
diff --git a/src/main.cpp b/src/main.cpp
index 9e029cf..1e8b942 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -198,6 +198,7 @@ void logic(){
for(int i=0;i<=entity.size();i++){
if(entity[i]->alive&&entity[i]->type == 1){
entity[i]->wander(90, &entity[i]->vel);
+ std::cout<<"works"<<i<<std::endl;
}
}
}