Unravel Engine C++ Reference
Loading...
Searching...
No Matches
animation_system.h
Go to the documentation of this file.
1#pragma once
2
3#include <base/basetypes.hpp>
4#include <context/context.hpp>
5#include <engine/ecs/scene.h>
6#include <hpp/span.hpp>
7
8namespace unravel
9{
11{
12public:
13 auto init(rtti::context& ctx) -> bool;
14 auto deinit(rtti::context& ctx) -> bool;
15
21 static void on_create_component(entt::registry& r, entt::entity e);
22
28 static void on_destroy_component(entt::registry& r, entt::entity e);
29
35 void on_frame_update(scene& scn, delta_t dt);
36
37 void on_play_begin(hpp::span<const entt::handle> entities, delta_t dt);
38
39private:
40
41
47
52 void on_play_end(rtti::context& ctx);
53
58 void on_pause(rtti::context& ctx);
59
64 void on_resume(rtti::context& ctx);
65
70 void on_skip_next_frame(rtti::context& ctx);
71
72 void on_update(scene& scn, delta_t dt, bool force);
73
74
75 std::shared_ptr<int> sentinel_ = std::make_shared<int>(0);
76};
77} // namespace unravel
static void on_create_component(entt::registry &r, entt::entity e)
Called when the component is created.
void on_play_begin(hpp::span< const entt::handle > entities, delta_t dt)
auto init(rtti::context &ctx) -> bool
auto deinit(rtti::context &ctx) -> bool
void on_frame_update(scene &scn, delta_t dt)
Updates the physics system for each frame.
static void on_destroy_component(entt::registry &r, entt::entity e)
Called when the component is destroyed.
std::chrono::duration< float > delta_t
Represents a scene in the ACE framework, managing entities and their relationships.
Definition scene.h:21