diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2015-09-28 08:15:18 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2015-09-28 08:15:18 -0400 |
commit | 2061c398aa801aa79eaa702b032daf1399483e9e (patch) | |
tree | 0e097e83250597b641de6abebc32834307136262 | |
parent | 60f685b7b544b94ae1e6212b939cdae5ac12e725 (diff) | |
parent | c8b859da1c52205973ad853eec91bf5a7cb882bb (diff) |
added dropping from platforms
-rw-r--r-- | src/entities.cpp | 3 | ||||
-rw-r--r-- | src/main.cpp | 1 |
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; } } } |