#pragma once

#include "Zombie.h"
#include <godot_cpp/classes/color_rect.hpp>
#include <godot_cpp/classes/navigation_region3d.hpp>
#include <godot_cpp/classes/packed_scene.hpp>
#include <godot_cpp/classes/random_number_generator.hpp>
#include <godot_cpp/classes/ref.hpp>
#include <godot_cpp/classes/timer.hpp>

namespace blitz {
class World : public godot::Node3D {

	GDCLASS(World, godot::Node3D);

  protected:
	static void _bind_methods();

  public:
	World();
	~World();

	void _ready();

  private:
	godot::ColorRect* m_RedRect;
	godot::Timer* m_Timer;
	godot::Timer* m_ZombieSpawnTimer;
	godot::Node3D* m_Spawns;
	godot::NavigationRegion3D* m_NavigationRegion;
	Zombie* m_ZombieInstance;
	godot::Ref<godot::PackedScene> m_ZombieScene;
	godot::Ref<godot::RandomNumberGenerator> m_RandomId;

	void _on_timer_timeout();
	void _on_zombie_spawn_timer_timeout();
	void _on_first_person_player_hit();
	Node* get_random_child(Node* parent_node);
};
}  // namespace blitz