#pragma once

#include "FirstPersonPlayer.h"
#include <godot_cpp/classes/center_container.hpp>
#include <godot_cpp/classes/line2d.hpp>

namespace blitz {
class Crosshair : public godot::CenterContainer {
	GDCLASS(Crosshair, godot::CenterContainer)
  protected:
	static void _bind_methods();

  public:
	Crosshair();
	~Crosshair();

	void _ready();
	void _process(float delta);
	void _draw();
	void set_dot_color(godot::Color col);

  private:
	godot::Color m_DotColor;
	float m_DotRadius;
	std::array<godot::Line2D*, 4> m_CrosshairLines;
	FirstPersonPlayer* m_Player;
	float m_CrosshairSpeed;
	float m_CrosshairDistance;
	godot::Vector3 m_Origin;
	godot::Vector2 m_Pos;

	void adjust_crosshair_lines();
};

}  // namespace blitz