Made handleDamage a singleton

This commit is contained in:
Glowbal 2015-05-14 17:41:50 +02:00
parent a48b6c9426
commit e98c7cd1b7
2 changed files with 15 additions and 1 deletions

View File

@ -12,6 +12,12 @@ namespace ace {
}
handleDamage& handleDamage::GetInstance()
{
static handleDamage instance;
return instance;
}
handleDamage::~handleDamage()
{
}

View File

@ -16,6 +16,11 @@ namespace ace {
class handleDamage
{
public:
/**
*
*/
static handleDamage& GetInstance();
~handleDamage();
/**
@ -56,7 +61,10 @@ namespace ace {
private:
handleDamage();
handleDamage(handleDamage const&) = delete;
void operator=(handleDamage const&) = delete;
std::vector<std::shared_ptr<ace::medical::injuries::DamageType>> damageTypes;
std::vector<std::shared_ptr<ace::medical::injuries::InjuryType>> injuryTypes;
std::vector<std::string> selections;