From 160e1299ef3d95f8e8c48706d7f61dd3dc6c6b60 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 11 Feb 2020 11:29:07 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=20tab=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/graphics/animations/animator.h | 64 +++++++++++++++---------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'src/libjin/graphics/animations/animator.h') 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 -- cgit v1.1-26-g67d0