#pragma once
#include "Building.h"
#include "Collision.h"
#include "Levels/Level.h"
#include "Player.h"
#include "GridSystem/WorldGridManager.h"
#include "Gui/Screens/ScreenManager.h"
#include "Camera.h"

class WorldLevel : public Level
{
public:
	WorldLevel(Camera* camera, Rectf viewport);
	virtual ~WorldLevel() override;

	WorldLevel(const WorldLevel& other) = default;
	WorldLevel(WorldLevel&& other) = default;

	void Update(float elapsedSec) override;
	void Draw() const override;

	void MouseMove(const Vector2f& mousePos) override;
	void ProcessImGui() override;

	WorldGridManager& GetGridManager() {
		return m_gridManager;
	}

	std::vector<Collision::CollisionRect> m_Rects;

private:
	WorldGridManager m_gridManager {};
	Player m_player;
	Vector2f m_mousePos {};

	Rectf m_viewport;

	ScreenManager* m_screenManager;

	WorldTile* m_pSelectedTile { nullptr };

	Building* m_refeulBuilding;

	float testLerp{ 0.0f };

	// ImGui Vars
	bool m_ShowTextureManagerWindow { false };
	bool m_ShowCameraWindow { false };
	bool m_ShowPlayerInfo { true };
};
