forked from rpbpolis/spic-prj-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Animator.hpp
39 lines (32 loc) · 924 Bytes
/
Animator.hpp
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 ANIMATOR_H_
#define ANIMATOR_H_
#include "Component.hpp"
#include "Sprite.hpp"
namespace spic {
/**
* @brief A component which can play animated sequences of sprites.
*/
class Animator : public Component {
public:
/**
* @brief Start playing the image sequence.
* @param looping If true, will automatically start again when done.
* @spicapi
*/
void Play(bool looping);
/**
* @brief Stop playing the image sequence. Whatever sprite was displayed
* last will remain shown.
* @spicapi
*/
void Stop();
private:
/**
* @brief frames per second (playing speed)
* @spicapi
*/
int fps;
// ... collection of Sprites here
};
}
#endif // ANIMATOR_H_