GameKit  0.0.1a
C++ gamedev tools
Public Member Functions | Private Attributes | List of all members
gk::HealthComponent Class Reference

#include <HealthComponent.hpp>

Public Member Functions

 HealthComponent (const u16 maxLife, const u16 life=0, const u16 hurtTime=0)
 
void setLife (const u16 newLife)
 
void addLife (const u16 lifeAdded)
 
void removeLife (const u16 lifeRemoved)
 
u16 life () const
 
u16 maxLife () const
 
Timer hurtTimer ()
 

Private Attributes

const u16 m_maxLife = 0
 
u16 m_life = 0
 
const u16 m_hurtTime = 0
 
Timer m_hurtTimer
 

Detailed Description

Definition at line 21 of file HealthComponent.hpp.

Constructor & Destructor Documentation

§ HealthComponent()

gk::HealthComponent::HealthComponent ( const u16  maxLife,
const u16  life = 0,
const u16  hurtTime = 0 
)
inline

Definition at line 23 of file HealthComponent.hpp.

Member Function Documentation

§ addLife()

void gk::HealthComponent::addLife ( const u16  lifeAdded)
inline

Definition at line 27 of file HealthComponent.hpp.

§ hurtTimer()

Timer gk::HealthComponent::hurtTimer ( )
inline

Definition at line 42 of file HealthComponent.hpp.

§ life()

u16 gk::HealthComponent::life ( ) const
inline

Definition at line 39 of file HealthComponent.hpp.

§ maxLife()

u16 gk::HealthComponent::maxLife ( ) const
inline

Definition at line 40 of file HealthComponent.hpp.

§ removeLife()

void gk::HealthComponent::removeLife ( const u16  lifeRemoved)
inline

Definition at line 28 of file HealthComponent.hpp.

§ setLife()

void gk::HealthComponent::setLife ( const u16  newLife)
inline

Definition at line 26 of file HealthComponent.hpp.

Member Data Documentation

§ m_hurtTime

const u16 gk::HealthComponent::m_hurtTime = 0
private

Definition at line 48 of file HealthComponent.hpp.

§ m_hurtTimer

Timer gk::HealthComponent::m_hurtTimer
private

Definition at line 50 of file HealthComponent.hpp.

§ m_life

u16 gk::HealthComponent::m_life = 0
private

Definition at line 46 of file HealthComponent.hpp.

§ m_maxLife

const u16 gk::HealthComponent::m_maxLife = 0
private

Definition at line 45 of file HealthComponent.hpp.


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