Author Topic: [SOLVED] Add method and onFinished for the same tween?  (Read 3273 times)

Somoraze

  • Guest
[SOLVED] Add method and onFinished for the same tween?
« on: September 08, 2013, 11:43:13 PM »
Hi,

How could you add more than one 'method' to a UITweener, knowing that the 'Begin' function is static?

I would like to add a method for the easing, and a delegate for when the tween finishes, but with this code, I cannot really add the onFinished :

  1. TweenPosition.Begin(obj, 1, Vector3.zero ).method = UITweener.Method.EaseOut;
  2. .onFinished = ...

maybe with a UITweener instance, but how does it work with "Begin" ?

Thanks
« Last Edit: September 09, 2013, 01:39:13 PM by Somoraze »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Add method and onFinished for the same tween?
« Reply #1 on: September 09, 2013, 01:00:13 AM »
  1. TweenPosition tp = TweenPosition.Begin(obj, 1, Vector3.zero);
  2. tp.method = UITweener.Method.EaseOut;

Somoraze

  • Guest
Re: Add method and onFinished for the same tween?
« Reply #2 on: September 09, 2013, 01:38:56 PM »
arf it was more simple than what I imagined
Thanks a lot