|
R-Type
Distributed multiplayer game engine in C++
|
Component containing all available animations for an entity. More...
#include <AnimationSet.hpp>


Public Member Functions | |
| AnimationSet (const std::string &textureKey) | |
| Constructor with texture key. | |
| ~AnimationSet () override=default | |
| std::string | getTextureKey () const |
| Get the texture key. | |
| const std::unordered_map< std::string, AnimationClip > & | getClips () const |
| Get all animation clips. | |
| const AnimationClip * | getClip (const std::string &clipName) const |
| Get a specific animation clip. | |
| bool | hasClip (const std::string &clipName) const |
| Check if a clip exists. | |
| void | setTextureKey (const std::string &textureKey) |
| Set the texture key. | |
| void | addClip (const std::string &clipName, const AnimationClip &clip) |
| Add an animation clip. | |
| void | removeClip (const std::string &clipName) |
| Remove an animation clip. | |
| ComponentType | getType () const override |
| Get the component type ID. | |
Public Member Functions inherited from ecs::IComponent | |
| virtual | ~IComponent ()=default |
| Virtual destructor. | |
Private Attributes | |
| std::string | _textureKey |
| Texture identifier for animations. | |
| std::unordered_map< std::string, AnimationClip > | _clips |
| Map of animation clips. | |
Component containing all available animations for an entity.
Stores the texture key and a map of named animation clips. This component defines what animations an entity can play.
Definition at line 54 of file AnimationSet.hpp.
|
inlineexplicit |
Constructor with texture key.
| textureKey | Texture identifier for all animations |
Definition at line 60 of file AnimationSet.hpp.
|
overridedefault |
|
inline |
Add an animation clip.
| clipName | Name of the clip |
| clip | Animation clip data |
Definition at line 104 of file AnimationSet.hpp.
References _clips.
Referenced by AnimDB::createBossArmAnimations(), AnimDB::createBossBodyAnimations(), AnimDB::createEnemyBasicAnimations(), AnimDB::createEnemyBulletAnimations(), AnimDB::createEnemyWalkingAnimations(), AnimDB::createOrbitalModuleAnimations(), AnimDB::createPlayerAnimations(), AnimDB::createPlayerBulletAnimations(), and AnimDB::getAnimationSet().
|
inline |
Get a specific animation clip.
| clipName | Name of the animation clip |
Definition at line 81 of file AnimationSet.hpp.
References _clips.
Referenced by ecs::AnimationSystem::update().
|
inline |
Get all animation clips.
Definition at line 74 of file AnimationSet.hpp.
References _clips.
|
inline |
Get the texture key.
Definition at line 68 of file AnimationSet.hpp.
References _textureKey.
|
inlineoverridevirtual |
Get the component type ID.
Implements ecs::IComponent.
Definition at line 116 of file AnimationSet.hpp.
|
inline |
Check if a clip exists.
| clipName | Name of the animation clip |
Definition at line 91 of file AnimationSet.hpp.
References _clips.
Referenced by ecs::AnimationSystem::update().
|
inline |
Remove an animation clip.
| clipName | Name of the clip to remove |
Definition at line 110 of file AnimationSet.hpp.
References _clips.
|
inline |
Set the texture key.
| textureKey | New texture identifier |
Definition at line 97 of file AnimationSet.hpp.
References _textureKey.
|
private |
Map of animation clips.
Definition at line 120 of file AnimationSet.hpp.
Referenced by addClip(), getClip(), getClips(), hasClip(), and removeClip().
|
private |
Texture identifier for animations.
Definition at line 119 of file AnimationSet.hpp.
Referenced by getTextureKey(), and setTextureKey().