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/animation.cpp | 94 ++++++++++++++-------------- 1 file changed, 47 insertions(+), 47 deletions(-) (limited to 'src/libjin/graphics/animations/animation.cpp') 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& frames) - { - mFrames.insert(mFrames.end(), frames.begin(), frames.end()); - } + void Animation::addFrames(const std::vector& 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(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(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 -- cgit v1.1-26-g67d0