Checking if tween is running? #37
-
How do you check if a particular tween you started is still running or not? |
Beta Was this translation helpful? Give feedback.
Answered by
jeffreylanters
Apr 20, 2023
Replies: 1 comment 3 replies
-
There isn't really a parameter that exposes the playing state. You can however add an event listener to its completion in order to check wether a tween is playing. // Psuedo
var isPlaying = false;
target
.TweenPositionX(1, 1)
.SetOnStart(() => isPlaying = true)
.SetOnComplete(() => isPlaying = false); |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Debjoy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There isn't really a parameter that exposes the playing state. You can however add an event listener to its completion in order to check wether a tween is playing.