#pragma once

#include <godot_cpp/classes/node3d.hpp>

namespace blitz {

class Player;
class NetworkInterface;

class World : public godot::Node3D {
	GDCLASS(World, godot::Node3D)
  protected:
	static void _bind_methods();

  public:
	World();
	~World();

	void _process(float delta);

	void _ready() override;

	Player* GetPlayerById(uint64_t a_PlayerId);

	void AddPlayer(int32_t a_PlayerId, godot::String a_PlayerName);
	void RemovePlayer(int32_t a_PlayerId);
	void SetPlayerPositionAndRotation(int64_t a_PlayerId, godot::Vector3 a_Position, godot::Vector3 a_Rotation);

  private:
	NetworkInterface* m_NetworkInterface;
	godot::Node* m_Players;
	float m_PassedTime;
};
}  // namespace blitz