ECS with entt

This commit is contained in:
Erris
2026-02-17 00:50:43 +01:00
parent 86392e0790
commit d4c420d5b4
30 changed files with 1314 additions and 222 deletions

View File

@@ -0,0 +1,33 @@
#ifndef SCENE_HPP
#define SCENE_HPP
#include <cstdint>
#include <entt/entt.hpp>
namespace OpenEngine {
class Entity;
class Scene
{
public:
Scene() {};
~Scene() = default;
Entity CreateEntity(const std::string& name = std::string());
void OnUpdate();
void OnViewportResize(uint32_t width, uint32_t height);
entt::registry& GetRegistry() { return registry; };
private:
entt::registry registry;
uint32_t viewport_width = 0, viewport_height = 0;
friend class Entity;
};
}
#endif // SCENE_HPP