diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2015-09-28 08:48:38 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2015-09-28 08:48:38 -0400 |
commit | 82727d2d50d6a71cd5e9d5a7c00fa41888a39eb7 (patch) | |
tree | 34334d941f7947e9933049e56c000a878f5371b3 /src/entities.cpp | |
parent | 9630c8a49cbad7b1b71b9401ff24881ebf4c7c25 (diff) |
improvements ;)
Diffstat (limited to 'src/entities.cpp')
-rw-r--r-- | src/entities.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/entities.cpp b/src/entities.cpp index e93f23a..9808086 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -63,6 +63,7 @@ void NPC::interact(){ Structures::Structures(){ type = -1; speed = 0; + alive = true; } unsigned int Structures::spawn(int t, float x, float y){ @@ -72,20 +73,21 @@ unsigned int Structures::spawn(int t, float x, float y){ /*VILLAGE*/ if(type == -1){ - width = 4 * HLINE; - height = 4 * HLINE; + loc.y=100; + width = 20 * HLINE; + height = 16 * HLINE; //int tempN = (getRand() % 5 + 1); int tempN = 2; for(int i=0;i<tempN;i++){ entity.push_back(new NPC()); npc.push_back(NPC()); - std::cout<<"NPC:"<<npc.size()<<std::endl; - std::cout<<"Entity:"<<entity.size()<<std::endl; + //std::cout<<"NPC:"<<npc.size()<<std::endl; + //std::cout<<"Entity:"<<entity.size()<<std::endl; entity[entity.size()] = &npc[npc.size()-1]; 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; + //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(); } |