engine/include/scene.hpp

43 lines
631 B
C++
Raw Normal View History

2022-11-30 00:46:03 +00:00
#pragma once
2022-12-15 10:07:22 +00:00
#include "log.hpp"
2022-12-14 22:50:17 +00:00
#include <cstdint>
2022-11-30 00:46:03 +00:00
namespace engine {
2022-12-20 23:51:04 +00:00
class Application;
namespace ecs {
2022-12-22 11:27:16 +00:00
class TransformSystem;
2022-12-20 23:51:04 +00:00
class RendererSystem;
}
2022-12-14 22:50:17 +00:00
class Scene {
2022-11-30 00:46:03 +00:00
public:
2022-12-20 23:51:04 +00:00
Scene(Application* app);
2022-11-30 00:46:03 +00:00
Scene(const Scene&) = delete;
Scene& operator=(const Scene&) = delete;
2022-11-30 10:36:50 +00:00
~Scene();
2022-11-30 00:46:03 +00:00
2022-12-15 10:07:22 +00:00
void update(float ts);
2022-12-14 22:50:17 +00:00
uint32_t createEntity()
{
return m_nextEntityID++;
}
2022-12-15 10:07:22 +00:00
2022-12-22 11:27:16 +00:00
std::unique_ptr<ecs::TransformSystem> m_transformSystem;
2022-12-15 15:54:11 +00:00
std::unique_ptr<ecs::RendererSystem> m_renderSystem;
2022-12-14 22:50:17 +00:00
2022-12-20 23:51:04 +00:00
Application* app() { return m_app; }
2022-11-30 00:46:03 +00:00
private:
2022-12-20 23:51:04 +00:00
Application* const m_app;
2022-12-14 22:50:17 +00:00
uint32_t m_nextEntityID = 1000;
2022-11-30 00:46:03 +00:00
};
2022-12-14 22:50:17 +00:00
}