blob: 72d9021eca7c64c280bfedb952708e799d4c40d4 (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#ifndef __JE_ANIMATOR_H__
#define __JE_ANIMATOR_H__
#include "je_animation.h"
namespace JinEngine
{
namespace Graphics
{
namespace Animations
{
class Animator
{
public:
Animator();
void play();
void pause();
void resume();
void update(float dt);
void rewind();
void render(float x, float y, float sx, float sy, float r);
void setAnimation(const Animation* anim);
void forceToFrame(uint index);
private:
const Animation* mAnimation;
uint mIndex;
float mTick;
bool mIsActive;
float mSpeed;
bool mLoop;
};
}
}
}
#endif
|