aboutsummaryrefslogtreecommitdiffstats
path: root/src/entities.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2015-09-28 08:14:20 -0400
committerClyne Sullivan <tullivan99@gmail.com>2015-09-28 08:14:20 -0400
commit60f685b7b544b94ae1e6212b939cdae5ac12e725 (patch)
tree1fd3d11972cd2887a7927611a0da763821645767 /src/entities.cpp
parent4391f9289b7368765b39c9654d6b0bdf2db8f36b (diff)
added dropping from platforms
Diffstat (limited to 'src/entities.cpp')
-rw-r--r--src/entities.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/entities.cpp b/src/entities.cpp
index da28851..140223d 100644
--- a/src/entities.cpp
+++ b/src/entities.cpp
@@ -50,9 +50,9 @@ NPC::NPC(){
width = HLINE * 8;
height = HLINE * 12;
speed = 1;
- type = 0;
+ type = 1;
subtype = 0;
- alive = false;
+ alive = true;
canMove = true;
}
@@ -78,13 +78,11 @@ unsigned int Structures::spawn(int t, float x, float y){
//int tempN = (getRand() % 5 + 1);
int tempN = 2;
for(int i=0;i<tempN;i++){
- entity.push_back(new Entity());
+ entity.push_back(new NPC());
npc.push_back(NPC());
std::cout<<"NPC:"<<npc.size()<<std::endl;
std::cout<<"Entity:"<<entity.size()<<std::endl;
entity[entity.size()] = &npc[npc.size()-1];
- entity[entity.size()]->alive=true;
- entity[entity.size()]->type = 1;
entity[entity.size()]->spawn(loc.x + (float)(i - 5) / 8,100);
}
return entity.size();