Emergency 2017 Dokumentation  v3.0.1
em5::HealthHelper Class Reference

EMERGENCY 5 health helper class. More...

#include <HealthHelper.h>

Public Member Functions

 HealthHelper (qsf::Entity &entity)
 Constructor. More...
 
 HealthHelper (HealthComponent &healthComponent)
 
 ~HealthHelper ()
 Destructor. More...
 
void drownPerson (FreeplayEvent *freeplayEvent)
 
bool injurePerson (uint32 injuryId, FreeplayEvent *freeplayEvent, bool playCollapseAnimation=true)
 
bool canTreatedByDoctor ()
 
bool isInjured ()
 
bool isKneeingInjury ()
 
bool isLyingInjury ()
 
void setInvincible (bool invicible)
 
void setImmuneToInjurySources (bool injury, bool illness, bool contamination=true)
 
void linkToStretcher (const qsf::Entity &stretcherEntity)
 
float getLifeEnergyPercentage ()
 
bool injurePersonByEventById (uint32 injuryId, FreeplayEvent *freeplayEvent, bool playCollapseAnimation=true)
 
bool injurePersonByInjuryAtStartup (FreeplayEvent *freeplayEvent, uint32 fallbackInjuryId=qsf::getUninitialized< uint32 >(), bool playCollapseAnimation=true)
 
bool injurePersonByFire (FreeplayEvent *freeplayEvent, bool playCollapseAnimation=true)
 Set injuries after the health energy of the person was gorged away by fire. More...
 
bool injurePersonBySmoke (FreeplayEvent *freeplayEvent, bool playCollapseAnimation=true)
 Set injuries after the person got to the window and waves. More...
 
bool injurePersonByDebris (FreeplayEvent *freeplayEvent)
 Set injuries after the person is trapped under a debris. More...
 
bool injurePersonByPlague (FreeplayEvent *freeplayEvent, bool playCollapseAnimation=true)
 Set plague injury. More...
 
bool injurePersonByContamination (FreeplayEvent *freeplayEvent, HealthComponent::ContaminationType contaminationType)
 Set injuries after the person got into a contamination cloud. More...
 
bool injurePersonByHostageTaking (FreeplayEvent *freeplayEvent)
 Set injuries after the person is injured by a hostage taking. More...
 
bool injurePersonByShoot (FreeplayEvent *freeplayEvent)
 Set injuries after the person is shot. More...
 
bool injurePersonByKnife (FreeplayEvent *freeplayEvent)
 Set injuries after the person is stabbed by knife. More...
 
bool injurePersonByBaseballBat (FreeplayEvent *freeplayEvent)
 Set injuries after the person is hit by a baseball bat. More...
 
bool injurePersonByStone (FreeplayEvent *freeplayEvent)
 Set injuries after the person is hit by a stone. More...
 
bool injurePersonByBrawl (FreeplayEvent *freeplayEvent)
 Set injuries after the person is injuried in a brawl. More...
 
bool injurePersonByElectricShock (FreeplayEvent *freeplayEvent)
 Set injuries after the person gets a electric shock. More...
 
bool injurePersonBySender (qsf::Component *sender)
 

Detailed Description

EMERGENCY 5 health helper class.

Definition at line 45 of file HealthHelper.h.

Constructor & Destructor Documentation

em5::HealthHelper::HealthHelper ( qsf::Entity entity)
explicit

Constructor.

em5::HealthHelper::HealthHelper ( HealthComponent healthComponent)
explicit
em5::HealthHelper::~HealthHelper ( )
inline

Destructor.

Definition at line 15 of file HealthHelper-inl.h.

Member Function Documentation

bool em5::HealthHelper::canTreatedByDoctor ( )
void em5::HealthHelper::drownPerson ( FreeplayEvent freeplayEvent)
float em5::HealthHelper::getLifeEnergyPercentage ( )
bool em5::HealthHelper::injurePerson ( uint32  injuryId,
FreeplayEvent freeplayEvent,
bool  playCollapseAnimation = true 
)
bool em5::HealthHelper::injurePersonByBaseballBat ( FreeplayEvent freeplayEvent)

Set injuries after the person is hit by a baseball bat.

bool em5::HealthHelper::injurePersonByBrawl ( FreeplayEvent freeplayEvent)

Set injuries after the person is injuried in a brawl.

bool em5::HealthHelper::injurePersonByContamination ( FreeplayEvent freeplayEvent,
HealthComponent::ContaminationType  contaminationType 
)

Set injuries after the person got into a contamination cloud.

bool em5::HealthHelper::injurePersonByDebris ( FreeplayEvent freeplayEvent)

Set injuries after the person is trapped under a debris.

bool em5::HealthHelper::injurePersonByElectricShock ( FreeplayEvent freeplayEvent)

Set injuries after the person gets a electric shock.

bool em5::HealthHelper::injurePersonByEventById ( uint32  injuryId,
FreeplayEvent freeplayEvent,
bool  playCollapseAnimation = true 
)

brief Use this method to injure a person by an event

bool em5::HealthHelper::injurePersonByFire ( FreeplayEvent freeplayEvent,
bool  playCollapseAnimation = true 
)

Set injuries after the health energy of the person was gorged away by fire.

bool em5::HealthHelper::injurePersonByHostageTaking ( FreeplayEvent freeplayEvent)

Set injuries after the person is injured by a hostage taking.

bool em5::HealthHelper::injurePersonByInjuryAtStartup ( FreeplayEvent freeplayEvent,
uint32  fallbackInjuryId = qsf::getUninitializeduint32 >(),
bool  playCollapseAnimation = true 
)

brief Injure person using a pre-edited injury

bool em5::HealthHelper::injurePersonByKnife ( FreeplayEvent freeplayEvent)

Set injuries after the person is stabbed by knife.

bool em5::HealthHelper::injurePersonByPlague ( FreeplayEvent freeplayEvent,
bool  playCollapseAnimation = true 
)

Set plague injury.

bool em5::HealthHelper::injurePersonBySender ( qsf::Component sender)

brief Use this method to injure a person by a sender

Note
The sender gives information about the reason why the person gets damaged. So specific injuries can be set.
Todo:
  • TODO(db): Add more specific cases to this method if there are unhandled damage reasons.
bool em5::HealthHelper::injurePersonByShoot ( FreeplayEvent freeplayEvent)

Set injuries after the person is shot.

bool em5::HealthHelper::injurePersonBySmoke ( FreeplayEvent freeplayEvent,
bool  playCollapseAnimation = true 
)

Set injuries after the person got to the window and waves.

bool em5::HealthHelper::injurePersonByStone ( FreeplayEvent freeplayEvent)

Set injuries after the person is hit by a stone.

bool em5::HealthHelper::isInjured ( )
bool em5::HealthHelper::isKneeingInjury ( )
bool em5::HealthHelper::isLyingInjury ( )
void em5::HealthHelper::linkToStretcher ( const qsf::Entity stretcherEntity)
void em5::HealthHelper::setImmuneToInjurySources ( bool  injury,
bool  illness,
bool  contamination = true 
)
void em5::HealthHelper::setInvincible ( bool  invicible)

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