|
R-Type
Distributed multiplayer game engine in C++
|
System managing sprite animation playback. More...
#include <AnimationSystem.hpp>


Public Member Functions | |
| AnimationSystem ()=default | |
| Default constructor. | |
| ~AnimationSystem () override=default | |
| Default destructor. | |
| void | update (Registry ®istry, float deltaTime) override |
| Updates all entity animations. | |
| ComponentMask | getComponentMask () const override |
| Gets the component mask for this system. | |
Public Member Functions inherited from ecs::ISystem | |
| virtual | ~ISystem ()=default |
| Virtual destructor. | |
System managing sprite animation playback.
Updates animation timers, advances frames, handles looping and transitions. Updates Sprite components with current animation frame rectangles. Requires Animation, AnimationSet, and Sprite components.
Definition at line 25 of file AnimationSystem.hpp.
|
default |
Default constructor.
|
overridedefault |
Default destructor.
|
overridevirtual |
Gets the component mask for this system.
Implements ecs::ISystem.
Definition at line 99 of file AnimationSystem.cpp.
Referenced by update().
|
overridevirtual |
Updates all entity animations.
Updates animation playback for all animated entities.
Performs the following operations per entity:
| registry | Reference to the ECS registry |
| deltaTime | Time elapsed since last frame (in seconds) |
Implements ecs::ISystem.
Definition at line 14 of file AnimationSystem.cpp.
References ecs::AnimationClip::frameDuration, ecs::AnimationClip::frames, ecs::AnimationSet::getClip(), ecs::Registry::getComponent(), getComponentMask(), ecs::Animation::getCurrentClipName(), ecs::Animation::getCurrentFrameIndex(), ecs::Registry::getEntitiesWithMask(), ecs::Animation::getTimer(), ecs::AnimationSet::hasClip(), ecs::Registry::hasComponent(), ecs::Animation::isPlaying(), ecs::AnimationClip::loop, ecs::AnimationClip::nextClip, ecs::Animation::setCurrentClipName(), ecs::Animation::setCurrentFrameIndex(), ecs::Animation::setPlaying(), ecs::Sprite::setSourceRect(), and ecs::Animation::setTimer().
