Skip to content

Checking if tween is running? #37

Answered by jeffreylanters
Debjoy asked this question in Q&A
Discussion options

You must be logged in to vote

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);

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Debjoy
Comment options

@jeffreylanters
Comment options

@jeffreylanters
Comment options

Answer selected by Debjoy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants