From 7bf392aeb264c6f700e9df8d13a83c8c5da26fc7 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 23 Jun 2019 22:36:01 +0300 Subject: [PATCH] Stop the animation when the action ends --- source/animate.cpp | 5 +++++ source/animate.h | 1 + 2 files changed, 6 insertions(+) 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 -- 2.43.0