Author Topic: Play Tween position in reverse if button not clicked  (Read 2817 times)

technoir

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 1
  • Posts: 27
    • View Profile
Play Tween position in reverse if button not clicked
« on: August 17, 2014, 07:50:04 PM »
I have a button which is half off-screen (similar to the NGUI sprite in Example 7) which plays a position tween which moves it fully into view when clicked. I would like to know how it would be possible to have it move back off-screen again if it is on-screen not clicked for a certain time (say for one second).

Any help would be great - Thanks in advance.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Play Tween position in reverse if button not clicked
« Reply #1 on: August 18, 2014, 11:39:52 AM »
You'd need to write a script for that. Detect that a certain time has passed without any action, then play the tween in reverse.