#pragma once
#include "global.h"
//前置声明
struct MyView;
class GameMap;
class GamePxa;
class Entity;
class MyGame;
struct MyMapLayer;
//地图系统
class MapSystem
{
public:
	virtual ~MapSystem();
	void Init(MyDX11Renderer* pRenderer, MyView* pView, GameMap* gameMap, GamePxa* gamePxa, std::weak_ptr<Entity>* mychar_ptr_Player1, std::weak_ptr<Entity>* mychar_ptr_Player2, MyGame* pGame);
	void SetShow(bool bShow);
	bool GetShow();
	void Step();
	void Draw(MyMapLayer* pLayer);//绘制小地图
	void OnResetScale();
	void Reset();
private:
	MyDX11Renderer* pRenderer = nullptr;
	MyView* pView = nullptr;
	GameMap* gameMap = nullptr;
	GamePxa* gamePxa = nullptr;
	std::weak_ptr<Entity>* mychar_ptr_Player1 = nullptr;
	std::weak_ptr<Entity>* mychar_ptr_Player2 = nullptr;
	MyGame* pGame = nullptr;
	bool bShow = false;
	//绘制房间名
	std::wstring roomName;
	MyTextureAndSRV tas;
	const int flash_interval = 8;
	int flash_counter = 0;
	bool showMcPos = false;
};

