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

40 lines
698 B
C
Raw Normal View History

#pragma once
#include <map>
#include <set>
#include "BlockID.h"
#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 14:02:53 -04:00
// fwd:
class cChunk;
2013-10-18 14:02:53 -04:00
/** This class is used to collect the list of mobs for each family
2013-10-18 14:02:53 -04:00
*/
class cMobFamilyCollecter
{
public :
2013-10-18 14:02:53 -04:00
typedef const std::set<cMonster::eFamily> tMobFamilyList;
// collect a mob
2013-10-18 14:02:53 -04:00
void CollectMob(cMonster & a_Monster);
// return the number of mobs for this family
2013-10-18 14:02:53 -04:00
int GetNumberOfCollectedMobs(cMonster::eFamily a_Family);
protected :
std::map<cMonster::eFamily, std::set<cMonster *> > m_Mobs;
2013-10-18 14:02:53 -04:00
} ;