From: Mikko Rasa Date: Sun, 23 Jun 2019 19:36:01 +0000 (+0300) Subject: Stop the animation when the action ends X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=7bf392aeb264c6f700e9df8d13a83c8c5da26fc7;p=libs%2Fdemoscene.git Stop the animation when the action ends --- diff --git a/source/animate.cpp b/source/animate.cpp index a7e406d..1eff05d 100644 --- a/source/animate.cpp +++ b/source/animate.cpp @@ -53,6 +53,11 @@ void Animate::start(float, float d) } } +void Animate::end(float) +{ + player->stop(*target, *anim); +} + Animate::Loader::Loader(Animate &a, Demo &d): DataFile::DerivedObjectLoader(a, d) diff --git a/source/animate.h b/source/animate.h index 7c8165c..ef497fa 100644 --- a/source/animate.h +++ b/source/animate.h @@ -36,6 +36,7 @@ public: virtual void validate() const; virtual void start(float, float); + virtual void end(float); }; } // namespace DemoScene