1 #ifndef HEALTHCOMPONENT_HPP
2 #define HEALTHCOMPONENT_HPP
9 #define DAMAGE_INVINCIBILITY_TIME 1500
17 void Update(
float deltaTime);
28 unsigned int lastDamaged;
32 unsigned int maxHealth;
Definition: TextUpdaters.hpp:27
bool invincible
Definition: HealthComponent.hpp:22
void HealthDown()
Reduces this component's health by one. If this reduces it to zero end the game.
Definition: HealthComponent.cpp:14
void Update(float deltaTime)
Update this component according to the deltaTime.
Definition: HealthComponent.cpp:7
HealthComponent(unsigned int maxHealth)
Creates a health component with the given maximumHealth.
Definition: HealthComponent.cpp:3
~HealthComponent()
Definition: HealthComponent.cpp:5
Definition: Component.hpp:13
Definition: HealthComponent.hpp:11