7#ifndef CORI_DISPOSABLE_ANIMATION_POOL_SIZE
8 #define CORI_DISPOSABLE_ANIMATION_POOL_SIZE 32
34 auto result = m_EntityPool.GetFreeEntity();
36 Entity entity = result.value().first;
37 uint16_t index = result.value().second;
40 tr.SetLocalDepth(depth);
41 tr.SetLocalScale(scale);
42 tr.SetLocalRotation(rotation);
45 qa.
Play(std::forward<
decltype(sequence)>(sequence)...);
47 qa.SetEngineStopCallback([
this, index] {
48 m_EntityPool.FreeIndex(index);
62 void OnQuadAnimationCreate(entt::registry& registry, entt::entity entity);
#define CORI_CORE_WARN_TAGGED(...)
A GameTimer is responsible for managing everything that is connected with time, ticks,...
Responsible for playing animations when attached to an entity.
void Play(const Graphics::IsAnimationWithParams auto &... sequence)
Plays a sequence of animations. @detials Animation sequence can be either looped or no,...
Creates a pool with disposable entities.
Entities are the essential part of WorldSystem.
decltype(auto) GetComponents()
Retries the references to the requested components of the entity.
System(const System &)=delete
System that is responsible for Animations, every Scene has it by default.
std::optional< Entity > PlayAnimation(const glm::vec2 position, const int16_t depth, const glm::vec2 scale, const float rotation, const Graphics::IsAnimationWithParams auto &... sequence)
Allows you to play animation sequence without having an entity to do so on. Fire and forget style.
static constexpr SystemPriority Priority
void OnTickUpdate(Core::GameTimer &gameTimer) override