2022-08-19 04:20:53 +00:00
|
|
|
#pragma once
|
|
|
|
|
2022-09-23 04:44:07 +00:00
|
|
|
#include "entt/entity/fwd.hpp"
|
2022-09-22 02:52:06 +00:00
|
|
|
#include "gfx/mesh.h"
|
2022-08-19 04:20:53 +00:00
|
|
|
#include "event/event.h"
|
|
|
|
#include "renderable.h"
|
2022-09-23 04:44:07 +00:00
|
|
|
#include "simpleengine/gfx/renderer.h"
|
2022-08-19 04:20:53 +00:00
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include <GLFW/glfw3.h>
|
|
|
|
#include <vector>
|
|
|
|
|
2022-09-23 04:44:07 +00:00
|
|
|
#include <entt/entt.hpp>
|
|
|
|
|
2022-08-19 04:20:53 +00:00
|
|
|
namespace simpleengine {
|
2022-09-23 04:44:07 +00:00
|
|
|
namespace ecs {
|
|
|
|
class Entity;
|
|
|
|
}
|
|
|
|
|
2022-08-19 04:20:53 +00:00
|
|
|
class Scene : public simpleengine::Event {
|
2022-09-23 04:44:07 +00:00
|
|
|
protected:
|
|
|
|
entt::registry registry;
|
|
|
|
std::shared_ptr<gfx::Renderer> renderer;
|
2022-08-19 04:20:53 +00:00
|
|
|
public:
|
2022-09-23 04:44:07 +00:00
|
|
|
Scene(std::shared_ptr<gfx::Renderer> renderer);
|
|
|
|
|
|
|
|
ecs::Entity create_entity();
|
|
|
|
|
|
|
|
virtual void update(const float& delta_time) override;
|
2022-10-13 03:18:47 +00:00
|
|
|
|
|
|
|
virtual void destroy() override;
|
2022-08-19 04:20:53 +00:00
|
|
|
};
|
|
|
|
}
|