diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-27 19:23:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-03-27 19:23:52 +0300 |
commit | a199f1aa431f872bc13c5df5a9afad0e52a1ee1d (patch) | |
tree | d98bc9d256f98714f0d9ebf635e7043900a10d58 /src/resources/animation.cpp | |
parent | 3d24b9f024dc9114165530aa58dc4a7832ca2753 (diff) | |
download | plus-a199f1aa431f872bc13c5df5a9afad0e52a1ee1d.tar.gz plus-a199f1aa431f872bc13c5df5a9afad0e52a1ee1d.tar.bz2 plus-a199f1aa431f872bc13c5df5a9afad0e52a1ee1d.tar.xz plus-a199f1aa431f872bc13c5df5a9afad0e52a1ee1d.zip |
Add pause animation tag.
Example: <pause delay="10"/>
Diffstat (limited to 'src/resources/animation.cpp')
-rw-r--r-- | src/resources/animation.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/resources/animation.cpp b/src/resources/animation.cpp index 388c1301e..853b79d64 100644 --- a/src/resources/animation.cpp +++ b/src/resources/animation.cpp @@ -70,6 +70,12 @@ void Animation::addGoto(std::string name, int rand) mFrames.push_back(frame); } +void Animation::addPause(int delay, int rand) +{ + Frame frame = { nullptr, delay, 0, 0, rand, Frame::PAUSE, "" }; + mFrames.push_back(frame); +} + void Animation::setLastFrameDelay(int delay) { FramesRevIter it = mFrames.rbegin(); |