diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-08-28 23:04:08 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-08-28 23:04:08 +0000 |
commit | 391203d83ed7a72b54fb7d7c72dbe35db14f0ea9 (patch) | |
tree | a9a9e14bbbdde0b48c66b99038d505a42a51609b /src/animation.cpp | |
parent | af61e1e7df91b97c3f7516e9eb2b37b621f069ad (diff) | |
download | mana-client-391203d83ed7a72b54fb7d7c72dbe35db14f0ea9.tar.gz mana-client-391203d83ed7a72b54fb7d7c72dbe35db14f0ea9.tar.bz2 mana-client-391203d83ed7a72b54fb7d7c72dbe35db14f0ea9.tar.xz mana-client-391203d83ed7a72b54fb7d7c72dbe35db14f0ea9.zip |
Merged trunk development between revisions 2530 and 2618 to the 0.1.0 branch.
Diffstat (limited to 'src/animation.cpp')
-rw-r--r-- | src/animation.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/animation.cpp b/src/animation.cpp index 1213d0d6..c1b27ebd 100644 --- a/src/animation.cpp +++ b/src/animation.cpp @@ -27,9 +27,15 @@ #include "utils/dtor.h" -Animation::Animation(): - mTime(0) +Animation::Animation() { + reset(); +} + +void +Animation::reset() +{ + mTime = 0; iCurrentPhase = mAnimationPhases.begin(); } @@ -123,3 +129,13 @@ Action::setAnimation(int direction, Animation *animation) mAnimations[direction] = animation; } + +void +Action::reset() +{ + for (AnimationIterator i = mAnimations.begin(); + i != mAnimations.end(); ++i) + { + i->second->reset(); + } +} |