aozhiwei a0dc185400 1
2021-08-24 19:26:34 +08:00

26 lines
503 B
C++

#pragma once
class MapInstance;
class Room;
struct RoomInitInfo;
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_;
};