Platform Data Engine 0.0.1
A data-driven game engine for platformers
|
Class that defines an "alive" object, ie. an object that can take damage and die More...
#include <Alive.h>
Public Member Functions | |
Alive () | |
Constructor | |
void | damage (float damageAmount) |
Deals damage and checks for death More... | |
float | getHealth () const |
void | setHealth (float hp) |
Protected Member Functions | |
virtual void | onDeath ()=0 |
virtual void | onDamage (float currentHP)=0 |
Protected Attributes | |
float | m_HP |
Class that defines an "alive" object, ie. an object that can take damage and die
void Alive::damage | ( | float | damageAmount | ) |
Deals damage and checks for death
damageAmount | amount of damage to deal in % where an object at full health is 100% |