#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"
#include "OrbitingObject.h"
#include "SoundEffect.h"
#include "SoundStream.h"
#include "Text.h"
#include "Gui/GuiMeter.h"
#include "Gui/Screens/MainScreen.h"
#include "Particle/Particle.h"

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

	WorldLevel(const WorldLevel& other) = delete;
	WorldLevel& operator=(const WorldLevel& other) = delete;
	WorldLevel(WorldLevel&& other) = delete;
	WorldLevel& operator=(WorldLevel&& other) = delete;

	

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

	void MouseMove(const Vector2f& mousePos) override;

	WorldGridManager& GetGridManager();

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


private:
	double m_Fps{ 0.0f };
	
	WorldGridManager m_GridManager;
	Player m_Player;
	Vector2f m_MousePos {};

	SoundStream* m_BackgroundMusic;
	
	Rectf m_Viewport;

	ScreenManager* m_ScreenManager;

	WorldTile* m_pSelectedTile { nullptr };

	std::vector<Building*> m_Buildings{};


	MainScreen* m_MainScreen{};

	OrbitingObject* m_Sun{ nullptr };
	OrbitingObject* m_Moon{ nullptr };

	Texture* m_TopCover{ nullptr };
	
};
