42 m_AnimationSequence.clear();
43 m_AnimationSequence.reserve(
sizeof...(sequence));
44 (m_AnimationSequence.emplace_back(sequence), ...);
45 m_CurrentLoopedSequenceIndex = 0;
47 m_CurrentFrameTick = 0;
49 m_ActiveSequence =
true;
51 bool loopedFlags[] = { sequence.second.LoopedInSequence ... };
52 m_LoopStartIndex = 0xFFFF;
53 for (uint32_t i = 0; i <
sizeof...(sequence); ++i) {
68 void Stop(
const bool abruptStop);
96 bool m_ActiveSequence;
97 glm::vec2 m_SizeScale{ 1.0f, 1.0f };
98 uint16_t m_LoopStartIndex{ 0xFFFF };
99 uint16_t m_CurrentLoopedSequenceIndex{ 0 };
101 uint32_t m_CurrentFrame{ 0 };
102 uint32_t m_CurrentFrameTick{ 0 };
105 std::vector<Graphics::AnimationWithParams> m_AnimationSequence;
106 World::Entity m_Entity{};
void SetStopCallback(StopCallbackFn callback)
Sets a callback that will be fired when any animation sequence stops.
glm::vec2 GetSizeScale() const
Retrieves the current scale modifier.
void Stop(const bool abruptStop)
Stops the current animation.
std::function< void()> StopCallbackFn
void SetEngineStopCallback(StopCallbackFn callback)
void Play(const Graphics::IsAnimationWithParams auto &... sequence)
Plays a sequence of animations. @detials Animation sequence can be either looped or no,...
void SetSizeScale(const glm::vec2 scale)
Changes the size scale.
Entities are the essential part of WorldSystem.
System that is responsible for Animations, every Scene has it by default.
Components that are used with the WorldSystem (ECS).
Anything connected to WorldSystem (ECS) is in this namespace.