Unravel Engine C++ Reference
Loading...
Searching...
No Matches
ecs.h
Go to the documentation of this file.
1#pragma once
2#include "scene.h"
3
4namespace unravel
5{
6
11struct ecs
12{
18 auto init(rtti::context& ctx) -> bool;
19
25 auto deinit(rtti::context& ctx) -> bool;
26
33
37 void unload_scene();
38
43 auto get_scene() -> scene&;
44
49 auto get_scene() const -> const scene&;
50
51private:
55 scene scene_{"game"};
56
60 std::shared_ptr<int> sentinel_ = std::make_shared<int>(0);
61};
62
63} // namespace unravel
std::chrono::duration< float > delta_t
Manages the entity-component-system (ECS) operations for the ACE framework.
Definition ecs.h:12
auto deinit(rtti::context &ctx) -> bool
Deinitializes the ECS with the given context.
Definition ecs.cpp:16
auto get_scene() -> scene &
Gets the current scene.
Definition ecs.cpp:30
void unload_scene()
Unloads the current scene.
Definition ecs.cpp:25
void on_frame_render(rtti::context &ctx, delta_t dt)
Renders a frame.
auto init(rtti::context &ctx) -> bool
Initializes the ECS with the given context.
Definition ecs.cpp:9
Represents a scene in the ACE framework, managing entities and their relationships.
Definition scene.h:21