Unravel Engine C++ Reference
Loading...
Searching...
No Matches
ecs.cpp
Go to the documentation of this file.
1#include "ecs.h"
2
3#include <engine/events.h>
4#include <logging/logging.h>
5
6namespace unravel
7{
8
9auto ecs::init(rtti::context& ctx) -> bool
10{
11 APPLOG_TRACE("{}::{}", hpp::type_name_str(*this), __func__);
12
13 return true;
14}
15
16auto ecs::deinit(rtti::context& ctx) -> bool
17{
18 APPLOG_TRACE("{}::{}", hpp::type_name_str(*this), __func__);
19
20 unload_scene();
21
22 return true;
23}
24
26{
27 scene_.unload();
28}
29
31{
32 return scene_;
33}
34
35auto ecs::get_scene() const -> const scene&
36{
37 return scene_;
38}
39
40} // namespace unravel
#define APPLOG_TRACE(...)
Definition logging.h:17
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
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
void unload()
Unloads the scene, removing all entities.
Definition scene.cpp:169