25 lines
482 B
C++
25 lines
482 B
C++
#pragma once
|
|
|
|
class MapInstance;
|
|
class Room;
|
|
class MapMgr : public a8::Singleton<MapMgr>
|
|
{
|
|
private:
|
|
MapMgr() {};
|
|
friend class a8::Singleton<MapMgr>;
|
|
|
|
public:
|
|
void Init();
|
|
void UnInit();
|
|
|
|
void AttachRoom(Room* room, RoomInitInfo& init_info);
|
|
MapInstance* GetMapInstance(int map_id);
|
|
|
|
private:
|
|
MapInstance* RandMapInstance(int map_mode);
|
|
|
|
private:
|
|
std::map<int, MapInstance*> instance_hash_;
|
|
std::map<int, std::vector<MapInstance*>> mode_hash_;
|
|
};
|