![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
#include <AnimationManager.h>
Public Member Functions | |
| void | Init () |
| void | LoadAnimationBanks (const std::string &directoryPath) |
| void | LoadAnimationGraphs (const std::string &directoryPath) |
| bool | LoadAnimationBank (const std::string &filePath) |
| bool | LoadAnimationGraph (const std::string &filePath) |
| AnimationBank * | GetBank (const std::string &bankName) |
| const AnimationBank * | GetBank (const std::string &bankName) const |
| AnimationGraph * | GetGraph (const std::string &graphName) |
| const AnimationGraph * | GetGraph (const std::string &graphName) const |
| const Olympe::AnimationSequence * | GetAnimationSequence (const std::string &bankId, const std::string &animName) const |
| Get animation sequence from a bank by name. | |
| bool | HasAnimation (const std::string &bankId, const std::string &animName) const |
| Check if animation exists in bank. | |
| void | Shutdown () |
Static Public Member Functions | |
| static AnimationManager & | GetInstance () |
| static AnimationManager & | Get () |
Private Member Functions | |
| AnimationManager ()=default | |
| ~AnimationManager ()=default | |
| AnimationManager (const AnimationManager &)=delete | |
| AnimationManager & | operator= (const AnimationManager &)=delete |
| std::vector< std::string > | ScanDirectory (const std::string &directoryPath) |
Private Attributes | |
| bool | m_initialized = false |
| std::unordered_map< std::string, std::unique_ptr< AnimationBank > > | m_banks |
| std::unordered_map< std::string, std::unique_ptr< AnimationGraph > > | m_graphs |
Definition at line 24 of file AnimationManager.h.
|
privatedefault |
|
privatedefault |
|
privatedelete |
|
inlinestatic |
Definition at line 33 of file AnimationManager.h.
References GetInstance().
Referenced by GameEngine::Initialize(), World::Initialize_ECS_Systems(), AnimationSystem::ResolveAnimationSequence(), and AnimationSystem::UpdateEntity().
Here is the call graph for this function:
Here is the caller graph for this function:| const Olympe::AnimationSequence * OlympeAnimation::AnimationManager::GetAnimationSequence | ( | const std::string & | bankId, |
| const std::string & | animName | ||
| ) | const |
Get animation sequence from a bank by name.
Helper function to avoid manual bank lookup + animation lookup.
Example:
Definition at line 116 of file AnimationManager.cpp.
References GetComponentTypeID_Static(), and m_banks.
Referenced by AnimationSystem::ResolveAnimationSequence().
Here is the call graph for this function:
Here is the caller graph for this function:| AnimationBank * OlympeAnimation::AnimationManager::GetBank | ( | const std::string & | bankName | ) |
Definition at line 83 of file AnimationManager.cpp.
References GetComponentTypeID_Static(), and m_banks.
Referenced by AnimationSystem::UpdateEntity().
Here is the call graph for this function:
Here is the caller graph for this function:| const AnimationBank * OlympeAnimation::AnimationManager::GetBank | ( | const std::string & | bankName | ) | const |
Definition at line 91 of file AnimationManager.cpp.
References GetComponentTypeID_Static(), and m_banks.
Here is the call graph for this function:| AnimationGraph * OlympeAnimation::AnimationManager::GetGraph | ( | const std::string & | graphName | ) |
Definition at line 99 of file AnimationManager.cpp.
References GetComponentTypeID_Static(), and m_graphs.
Here is the call graph for this function:| const AnimationGraph * OlympeAnimation::AnimationManager::GetGraph | ( | const std::string & | graphName | ) | const |
Definition at line 107 of file AnimationManager.cpp.
References GetComponentTypeID_Static(), and m_graphs.
Here is the call graph for this function:
|
inlinestatic |
Definition at line 28 of file AnimationManager.h.
References GetComponentTypeID_Static().
Referenced by Get().
Here is the call graph for this function:
Here is the caller graph for this function:| bool OlympeAnimation::AnimationManager::HasAnimation | ( | const std::string & | bankId, |
| const std::string & | animName | ||
| ) | const |
Check if animation exists in bank.
| bankId | Bank identifier |
| animName | Animation name |
Definition at line 149 of file AnimationManager.cpp.
References OlympeAnimation::AnimationBank::GetAnimation(), GetComponentTypeID_Static(), and m_banks.
Here is the call graph for this function:| void OlympeAnimation::AnimationManager::Init | ( | ) |
Definition at line 24 of file AnimationManager.cpp.
References m_initialized, and SYSTEM_LOG.
Referenced by GameEngine::Initialize().
Here is the caller graph for this function:Definition at line 59 of file AnimationManager.cpp.
References GetComponentTypeID_Static(), and m_banks.
Referenced by LoadAnimationBanks().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 33 of file AnimationManager.cpp.
References GetComponentTypeID_Static(), LoadAnimationBank(), m_banks, ScanDirectory(), and SYSTEM_LOG.
Referenced by GameEngine::Initialize(), and World::Initialize_ECS_Systems().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 71 of file AnimationManager.cpp.
References GetComponentTypeID_Static(), and m_graphs.
Referenced by LoadAnimationGraphs().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 46 of file AnimationManager.cpp.
References GetComponentTypeID_Static(), LoadAnimationGraph(), m_graphs, ScanDirectory(), and SYSTEM_LOG.
Referenced by GameEngine::Initialize(), and World::Initialize_ECS_Systems().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatedelete |
|
private |
Definition at line 178 of file AnimationManager.cpp.
References GetComponentTypeID_Static(), and SYSTEM_LOG.
Referenced by LoadAnimationBanks(), and LoadAnimationGraphs().
Here is the call graph for this function:
Here is the caller graph for this function:| void OlympeAnimation::AnimationManager::Shutdown | ( | ) |
Definition at line 170 of file AnimationManager.cpp.
References m_banks, m_graphs, m_initialized, and SYSTEM_LOG.
|
private |
Definition at line 97 of file AnimationManager.h.
Referenced by GetAnimationSequence(), GetBank(), GetBank(), HasAnimation(), LoadAnimationBank(), LoadAnimationBanks(), and Shutdown().
|
private |
Definition at line 98 of file AnimationManager.h.
Referenced by GetGraph(), GetGraph(), LoadAnimationGraph(), LoadAnimationGraphs(), and Shutdown().
Definition at line 95 of file AnimationManager.h.
Referenced by Init(), and Shutdown().