1
0
Fork 0
cuberite-2a/src/MobFamilyCollecter.h

31 lines
621 B
C
Raw Normal View History

#pragma once
#include "Mobs/Monster.h" // This is a side-effect of keeping Mobfamily inside Monster class. I'd prefer to keep both (Mobfamily and Monster) inside a "Monster" namespace MG TODO : do it
2013-10-18 18:02:53 +00:00
/** This class is used to collect the list of mobs for each family
2013-10-18 18:02:53 +00:00
*/
class cMobFamilyCollecter
{
public :
2013-10-18 18:02:53 +00:00
typedef const std::set<cMonster::eFamily> tMobFamilyList;
// collect a mob
2013-10-18 18:02:53 +00:00
void CollectMob(cMonster & a_Monster);
// return the number of mobs for this family
2013-10-18 18:02:53 +00:00
int GetNumberOfCollectedMobs(cMonster::eFamily a_Family);
protected :
std::map<cMonster::eFamily, std::set<cMonster *> > m_Mobs;
2013-10-18 18:02:53 +00:00
} ;