Cuberite
A lightweight, fast and extensible game server for Minecraft
MobFamilyCollecter.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #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
5 
6 
7 
8 
9 
13 {
14 public :
15  typedef const std::set<cMonster::eFamily> tMobFamilyList;
16 
17  // collect a mob
18  void CollectMob(cMonster & a_Monster);
19 
20  // return the number of mobs for this family
22 
23 protected :
24  std::map<cMonster::eFamily, std::set<cMonster *> > m_Mobs;
25 
26 } ;
27 
28 
29 
30 
This class is used to collect the list of mobs for each family.
int GetNumberOfCollectedMobs(cMonster::eFamily a_Family)
void CollectMob(cMonster &a_Monster)
const std::set< cMonster::eFamily > tMobFamilyList
std::map< cMonster::eFamily, std::set< cMonster * > > m_Mobs