#pragma once

#include "BaseGame.h"
#include "Camera.h"
#include "Levels/MainMenu/MainMenuLevel.h"
#include "Levels/World/WorldLevel.h"

class Game : public BaseGame
{
public:
	explicit Game(const Window& window);
	Game(const Game& other) = delete;
	Game& operator=(const Game& other) = delete;
	Game(Game&& other) = delete;
	Game& operator=(Game&& other) = delete;
	// http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rh-override
	~Game() override;

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

	// Event handling
	void ProcessKeyDownEvent(const SDL_KeyboardEvent& e) override;
	void ProcessKeyUpEvent(const SDL_KeyboardEvent& e) override;
	void ProcessMouseMotionEvent(const SDL_MouseMotionEvent& e) override;
	void ProcessMouseDownEvent(const SDL_MouseButtonEvent& e) override;
	void ProcessMouseUpEvent(const SDL_MouseButtonEvent& e) override;

	void ProcessImGui() override;

	static Rectf VIEWPORT;

private:
	// FUNCTIONS
	void Initialize();
	void Cleanup();


	Camera m_Camera;
	WorldLevel m_WorldLevel;
	MainMenuLevel m_MainMenuLevel;

	Level* m_pCurrentLevel;

	Vector2f m_MousePos {};
	Vector2f m_MouseOffset {};
	bool m_IsRightMouseDown {};

};
