aboutsummaryrefslogtreecommitdiffstats
path: root/src/entities.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2015-10-26 08:47:42 -0400
committerdrumsetmonkey <abelleisle@roadrunner.com>2015-10-26 08:47:42 -0400
commit3166fd5ad6c1c4d1f79d48e69e9f3775f4f6e54e (patch)
tree694a42db4f771b65690315bae09ae4a1a9c170ce /src/entities.cpp
parent99c8a41cde3e5ec74f35660c8701de4326ffcd21 (diff)
Made basic robin texture, pixelated mount washington for backdrop test
Diffstat (limited to 'src/entities.cpp')
-rw-r--r--src/entities.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/entities.cpp b/src/entities.cpp
index ae8b4c8..174495a 100644
--- a/src/entities.cpp
+++ b/src/entities.cpp
@@ -48,6 +48,8 @@ NPC::NPC(){ //sets all of the NPC specific traits on object creation
type = NPCT; //sets type to npc
subtype = 0;
+
+ health = maxHealth = 100;
tex = new Texturec(1,"assets/NPC.png");
inv = new Inventory(NPC_INV_SIZE);
@@ -63,14 +65,17 @@ Structures::Structures(){ //sets the structure type
}
Mob::Mob(int sub){
- width = HLINE * 10;
- height = HLINE * 8;
type = MOBT; //sets type to MOB
subtype = sub; //SKIRL
- if(subtype == 1){//RABBIT
+ if(sub == 1){//RABBIT
+ width = HLINE * 10;
+ height = HLINE * 8;
tex = new Texturec(2, "assets/rabbit.png", "assets/rabbit1.png");
- }else if(subtype == 2){//BIRD
+ }else if(sub == 2){//BIRD
//add bird textures and bird things
+ width = HLINE * 8;
+ height = HLINE * 8;
+ tex = new Texturec(1, "assets/robin.png");
}
inv = new Inventory(NPC_INV_SIZE);
}
@@ -137,6 +142,13 @@ void Entity::draw(void){ //draws the entities
tex->bind(0);
}
break;
+ case 2: //RABBIT
+ if(ground == 0){
+ tex->bind(0);
+ }else if(ground == 1){
+ tex->bind(0);
+ }
+ break;
default:
break;
}