Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: fryza on April 03, 2013, 11:35:55 PM

Title: Tween position of panels via code
Post by: fryza on April 03, 2013, 11:35:55 PM
Something that seems like it should be an easy task is proving quite difficult.

I just want a certain function to be called which will animate all my UI on screen at a SPECIFIC time.

In the past I would just move stuff with iTween - ie iTween.MoveTo(Vector3....

I tried iTween on my NGUI panel that holds my objects and it doesn't work right - I can't even explain it but the results are far from desirable.

I have a camera cut-scene - when that ends I want the game UI to animate gracefully on the screen. So two questions:

1) How do I move Panels and Sprites with NGUI (is there a way to do this with iTween - they have great easing algorithms)
2) How do I trigger the move event via code (without having to use the onClick, etc) - what I would like is myPanel.TweenTo(x,y,z)

Thoughts?
Title: Re: Tween position of panels via code
Post by: dlewis on April 04, 2013, 12:25:17 AM
TweenPosition.Begin(GameObject, Time, To);