diff options
author | chai <chaifix@163.com> | 2020-02-11 11:29:07 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-02-11 11:29:07 +0800 |
commit | 160e1299ef3d95f8e8c48706d7f61dd3dc6c6b60 (patch) | |
tree | abe5ae5242d9cc6caf6edf103e662c44e978fca0 /src/libjin/graphics/animations/animator.h | |
parent | e095043485d1d298571af6d9eca7f0db9009ea7a (diff) |
Diffstat (limited to 'src/libjin/graphics/animations/animator.h')
-rw-r--r-- | src/libjin/graphics/animations/animator.h | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/src/libjin/graphics/animations/animator.h b/src/libjin/graphics/animations/animator.h index 263c7cb..6a0cb28 100644 --- a/src/libjin/graphics/animations/animator.h +++ b/src/libjin/graphics/animations/animator.h @@ -10,61 +10,61 @@ namespace JinEngine { - namespace Graphics - { - namespace Animations - { + namespace Graphics + { + namespace Animations + { - class Animator : public Object, public Renderable - { - public: - Animator(); + class Animator : public Object, public Renderable + { + public: + Animator(); - void play(); + void play(); - void pause(); + void pause(); - void resume(); + void resume(); - void update(float dt); + void update(float dt); - void rewind(); + void rewind(); - void render(float x, float y, float sx, float sy, float r) const override; + void render(float x, float y, float sx, float sy, float r) const override; - void setAnimation(const Animation* anim); + void setAnimation(const Animation* anim); - void forceToFrame(uint index); + void forceToFrame(uint index); - void setSpeed(float speed); + void setSpeed(float speed); - void setDefaultSpeed(); + void setDefaultSpeed(); - void setLoop(bool loop); + void setLoop(bool loop); - void setDefaultLoop(); + void setDefaultLoop(); - float getSpeed(); + float getSpeed(); - uint getFrameCount(); + uint getFrameCount(); - private: - const Animation* mAnimation; + private: + const Animation* mAnimation; - uint mIndex; + uint mIndex; - float mTick; + float mTick; - bool mIsActive; + bool mIsActive; - float mSpeed; + float mSpeed; - bool mLoop; + bool mLoop; - }; + }; - } - } + } + } } #endif
\ No newline at end of file |