From 18e03b1f268b002b199c8c4cbeef3618ca605f9a Mon Sep 17 00:00:00 2001 From: DashyFox Date: Thu, 22 May 2025 13:38:16 +0300 Subject: [PATCH] Update Tween.h --- Tween.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Tween.h b/Tween.h index e60ca71..9e7fe50 100644 --- a/Tween.h +++ b/Tween.h @@ -156,7 +156,7 @@ public: void stop() { isPlayingF = false; current = to; - triggerLastTick = true; + triggerLastTick = false; } bool isPlaying() const { @@ -270,6 +270,14 @@ class AnimationChain : public TweenListener { currentUserPtr = nullptr; } + bool isStaticAnim() { + if(!isChainPlaying()) return true; + const Anim& anim = animations[currentIndex]; + float from = anim.fromFunc ? anim.fromFunc() : anim.from; + float to = anim.to; + return from == to; + } + //------------------------------------------------------------------ // STATE //------------------------------------------------------------------