mirror of
https://github.com/Show-maket/Tween.git
synced 2025-09-13 03:12:51 +00:00
Update Tween.h
This commit is contained in:
10
Tween.h
10
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
|
||||
//------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user