Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: ajdickson1208 on September 02, 2014, 02:56:40 PM

Title: A very basic question about Tween codes.
Post by: ajdickson1208 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!
Title: Re: A very basic question about Tween codes.
Post by: Nicki 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. :)