blob: 51c9ff3063969db998628e2aa98ae5a413633412 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#ifndef ANIMATIONMANAGER_H
#define ANIMATIONMANAGER_H
#include "Runtime/Utilities/LinkedList.h"
class Animation;
class AnimationManager
{
public:
static void InitializeClass ();
static void CleanupClass ();
/// Animates all registered objects according to the registered parameters
/// Removes Animations if the animated object or the track is gone or if the time
/// of the track end time of the animation is reached
void Update ();
public:
void AddDynamic(ListNode<Animation>& node) { m_Animations.push_back(node); }
void AddFixed (ListNode<Animation>& node) { m_FixedAnimations.push_back(node); }
#if ENABLE_PROFILER
int GetUpdatedAnimationCount () { return m_Animations.size_slow() + m_FixedAnimations.size_slow(); }
#endif
private:
typedef List< ListNode<Animation> > AnimationList;
AnimationList m_Animations;
AnimationList m_FixedAnimations;
};
AnimationManager& GetAnimationManager ();
#endif
|