Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
animation.hpp File Reference

Animation: sprites showing the frames of their clip in turn, and effects that end with their clip. More...

#include <aegis2d/ecs/components.hpp>
#include <aegis2d/ecs/registry.hpp>
#include <aegis2d/ecs/system.hpp>
#include <algorithm>
#include <cmath>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  aegis2d
 Root namespace of the engine.
 
namespace  aegis2d::ecs
 Entity-Component-System used by client and server.
 

Functions

std::uint32_t aegis2d::ecs::advance (Animation &animation, float seconds) noexcept
 Moves an animation forward and tells which frame it shows.
 
void aegis2d::ecs::animate_sprites (Registry &registry, const Tick &tick)
 Advances every animation by one tick and shows its frame.
 
void aegis2d::ecs::destroy_finished_animations (Registry &registry, std::vector< Entity > &destroyed)
 Destroys the effects whose animation has played to the end.
 

Detailed Description

Animation: sprites showing the frames of their clip in turn, and effects that end with their clip.