From 3166fd5ad6c1c4d1f79d48e69e9f3775f4f6e54e Mon Sep 17 00:00:00 2001 From: drumsetmonkey Date: Mon, 26 Oct 2015 08:47:42 -0400 Subject: Made basic robin texture, pixelated mount washington for backdrop test --- src/entities.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/entities.cpp') 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; } -- cgit v1.2.3