Added dead check

This commit is contained in:
jancoow
2016-06-21 17:07:19 +02:00
parent 02a537dc60
commit d14f045708
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -83,7 +83,11 @@ void Enemy::collide(const Entity * entity)
}
void Enemy::hit(int damage){
health -= damage;
}
bool Enemy::isDead(){
return health < 0;
}
void Enemy::update(float delta)
+1
View File
@@ -29,6 +29,7 @@ public:
void inEyeSight(Vec3f &);
void collide(const Entity *entity);
void hit(int damage);
bool isDead(void);
private:
int hit_sound_id;
};