aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/graphics/animations/je_animation.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin/graphics/animations/je_animation.h')
-rw-r--r--src/libjin/graphics/animations/je_animation.h86
1 files changed, 9 insertions, 77 deletions
diff --git a/src/libjin/graphics/animations/je_animation.h b/src/libjin/graphics/animations/je_animation.h
index 4c2fd64..1c8a885 100644
--- a/src/libjin/graphics/animations/je_animation.h
+++ b/src/libjin/graphics/animations/je_animation.h
@@ -21,98 +21,30 @@ namespace JinEngine
public:
Animation();
- ///
- ///
- ///
void addFrame(const Sprite* frame);
- ///
- ///
- ///
void addFrames(const std::vector<Sprite*>& frames);
- ///
- ///
- ///
- void update(float dt);
-
- ///
- ///
- ///
- void pause();
-
- ///
- ///
- ///
- void resume();
-
- ///
- /// Force rewind.
- ///
- void rewind();
-
- ///
- ///
- ///
+ void setLoop(bool loop);
+
void setSpeed(float speed);
- ///
- ///
- ///
- void setLoop(bool isLoop);
-
- ///
- /// Get current frame index.
- ///
- uint getCurrentFrameIndex();
-
- ///
- ///
- ///
- const Sprite* getCurrentFrame();
-
- ///
- /// Set current frame index.
- ///
- /// @param frame Current frame to play.
- ///
- void setCurrentFrame(uint frame);
-
- ///
- ///
- ///
- void render(float x, float y, float sx, float sy, float r);
-
- ///
- ///
- ///
- Animation clone();
+ bool isLoop() const;
- private:
+ float getSpeed() const;
- void next();
+ uint getFrameCount() const;
- ///
- /// Key frames.
- ///
- std::vector<const Sprite*> mFrames;
+ const Sprite* getFrame(uint index) const;
- ///
- /// Animation playing speed.
- ///
- float mSpeed;
+ private:
- ///
- ///
- ///
- float mTick;
+ std::vector<const Sprite*> mFrames;
- uint mIndex;
+ float mSpeed;
float mLoop;
- bool mActive;
-
};
} // namespace Animations