diff options
Diffstat (limited to 'src/libjin/graphics/animations/animation.cpp')
-rw-r--r-- | src/libjin/graphics/animations/animation.cpp | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/src/libjin/graphics/animations/animation.cpp b/src/libjin/graphics/animations/animation.cpp index 168c3e3..3eb67c0 100644 --- a/src/libjin/graphics/animations/animation.cpp +++ b/src/libjin/graphics/animations/animation.cpp @@ -5,61 +5,61 @@ using namespace JinEngine::Math; namespace JinEngine { - namespace Graphics - { - namespace Animations - { + namespace Graphics + { + namespace Animations + { - Animation::Animation() - : mLoop(true) - { - } + Animation::Animation() + : mLoop(true) + { + } - void Animation::addFrame(const Sprite* frame) - { - if(frame != nullptr) - mFrames.push_back(frame); - } + void Animation::addFrame(const Sprite* frame) + { + if(frame != nullptr) + mFrames.push_back(frame); + } - void Animation::addFrames(const std::vector<Sprite*>& frames) - { - mFrames.insert(mFrames.end(), frames.begin(), frames.end()); - } + void Animation::addFrames(const std::vector<Sprite*>& frames) + { + mFrames.insert(mFrames.end(), frames.begin(), frames.end()); + } - void Animation::setSpeed(float speed) - { - mSpeed = speed; - } + void Animation::setSpeed(float speed) + { + mSpeed = speed; + } - void Animation::setLoop(bool loop) - { - mLoop = loop; - } + void Animation::setLoop(bool loop) + { + mLoop = loop; + } - const Sprite* Animation::getFrame(uint index) const - { - if (mFrames.size() == 0) - return nullptr; - if (without<uint>(index, 0, mFrames.size() - 1)) - return nullptr; - return mFrames[index]; - } + const Sprite* Animation::getFrame(uint index) const + { + if (mFrames.size() == 0) + return nullptr; + if (without<uint>(index, 0, mFrames.size() - 1)) + return nullptr; + return mFrames[index]; + } - uint Animation::getFrameCount() const - { - return mFrames.size(); - } + uint Animation::getFrameCount() const + { + return mFrames.size(); + } - bool Animation::isLoop() const - { - return mLoop; - } + bool Animation::isLoop() const + { + return mLoop; + } - float Animation::getSpeed() const - { - return mSpeed; - } + float Animation::getSpeed() const + { + return mSpeed; + } - } - } + } + } }
\ No newline at end of file |