Author Topic: A very basic question about Tween codes.  (Read 5127 times)

ajdickson1208

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
A very basic question about Tween codes.
« on: September 02, 2014, 02:56:40 PM »
I apologize for my poor English writing and my noobish question.

If I attach a Tween Position script component to a game object and want to enable the script with codes from another script, how may I do so?
Basically I'm just trying to press escape using Input.GetKeyDown(KeyCode.Escape) to open up a menu that tweens from out of the screen.

I know I can use TweenPosition.Begin(gameObject, 2f, Position), but is it possible to have the Tween Position component play backwards with codes instead?
It doesn't seem like there are as much options like "Animation Curve" if I'm just using TweenPosition.Begin.
Maybe something like the UITweener.PlayReverse() can be my solution? I'm not sure how to use it if so.

Thanks!
« Last Edit: September 02, 2014, 03:05:03 PM by ajdickson1208 »

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: A very basic question about Tween codes.
« Reply #1 on: September 02, 2014, 06:11:05 PM »
Look into the properties exposed through UITweener. The TweenPosition.Begin returns the TweenPOsition object, on that you can set the easing - I think it's called "method"? Something like that. :)