Platform Data Engine 0.0.1
A data-driven game engine for platformers
PlatformDataEngine::Alive Class Referenceabstract

Class that defines an "alive" object, ie. an object that can take damage and die More...

#include <Alive.h>

Inheritance diagram for PlatformDataEngine::Alive:
PlatformDataEngine::GameObject

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
 

Detailed Description

Class that defines an "alive" object, ie. an object that can take damage and die

Member Function Documentation

◆ damage()

void Alive::damage ( float  damageAmount)

Deals damage and checks for death

Parameters
damageAmountamount of damage to deal in % where an object at full health is 100%

The documentation for this class was generated from the following files: