-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnimationSystem.h
More file actions
56 lines (47 loc) · 1.31 KB
/
AnimationSystem.h
File metadata and controls
56 lines (47 loc) · 1.31 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once
#include <vector>
#include <cstdint>
#include "AnimationComponent.h"
/**
* @brief System for managing and updating sprite animations
*/
class AnimationSystem
{
public:
/**
* @brief Constructor
*/
AnimationSystem();
/**
* @brief Destructor
*/
~AnimationSystem();
/**
* @brief Register an animation component with the system
* @param animation_component Component to register
*/
void RegisterAnimationComponent(AnimationComponent* animation_component);
/**
* @brief Unregister an animation component from the system
* @param animation_component Component to unregister
*/
void UnregisterAnimationComponent(AnimationComponent* animation_component);
/**
* @brief Update all registered animation components
* @param current_time Current time in milliseconds
*/
void UpdateAnimations(uint32_t current_time);
/**
* @brief Clear all registered animation components
* Used when stopping play mode to prevent stale pointers
*/
void ClearAll();
/**
* @brief Get the singleton instance
* @return Reference to the singleton instance
*/
static AnimationSystem& GetInstance();
private:
std::vector<AnimationComponent*> animation_components;
static AnimationSystem* instance;
};