Author Topic: Tween isPlaying?  (Read 2236 times)

PabloAM

  • Jr. Member
  • **
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 58
    • View Profile
Tween isPlaying?
« on: December 21, 2016, 01:05:42 PM »
Hello I would like to know if there is any way to know if a Tween is playing in order to avoid to call it again.

Thanks!

Holy Manfred

  • Jr. Member
  • **
  • Thank You
  • -Given: 1
  • -Receive: 8
  • Posts: 71
    • View Profile
Re: Tween isPlaying?
« Reply #1 on: December 23, 2016, 10:49:41 AM »
You could use UITweener.onFinished to get a callback when the tween is done.
Or, if it is applicable in your case, you could use the UIPlayTween component to take care of the tween handling for you.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tween isPlaying?
« Reply #2 on: December 24, 2016, 11:21:52 PM »
Tweens disable themselves when they are done, so just use tween.enabled.