-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCAnimation.h
More file actions
43 lines (28 loc) · 785 Bytes
/
CAnimation.h
File metadata and controls
43 lines (28 loc) · 785 Bytes
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
//==============================================================================
// Animation Class
//==============================================================================
#ifndef _CANIMATION_H_
#define _CANIMATION_H_
#include <SDL.h>
//==============================================================================
class CAnimation
{
private:
int FrameInc;
private:
int FrameRate; //Milliseconds
long OldTime;
public:
int CurrentFrame;
int MaxFrames;
bool Oscillate;
public:
CAnimation();
void OnAnimate();
public:
void SetFrameRate(int Rate);
void SetCurrentFrame(int Frame);
const int GetCurrentFrame();
};
//==============================================================================
#endif