Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: nah0y on June 21, 2012, 10:03:36 AM
-
Hello,
I'm doing a lot of small "animations" (it's more state change) using UIButtonTween on a parent object, triggering a Tween on a child with a TweenPosition for example.
My problem is that I want the Tween to be immediate, so right now, I just put 0.000001 in the duration of the tween, but it's :
- ugly
- sometimes not working properly (when clicking like a mad person on the button)
It will be really useful to be able to put a duration of 0 so that it's immediate.
Of course, I could do all that using code, but here I just have to attach a script to my object and set a new position, color etc...
-
Done. You will see it in the next update, along with the "Sample (float factor)" function, where factor is the 0-1 value in case you want to do sampling yourself.
-
Cool !
I did not understand what the Sample function is, but we'll see :)
Ps : Do you have a date for the new version ?
-
Probably Sunday-ish.
-
Awesome !
-
I'm sorry to re-open the subject, but I've tested to set a delay of 0 with the new 2.0.9a version, and i Still have a little delay.
Let me explain :
I have a ImageButton, with a normal and pressed state. So when I press the button, it sets the pressed sprite.
I also have a UIButtonTween script attached to the ImageButton, that is triggered on OnPress and Play Direction : Toggle.
Finally, I have a child of the ImageButton, than is a label, with a TweenPosition script on it.
So when I PRESS the ImageButton, it triggers the TweenPosition (delay : 0) from the label.
But, when I press the ImageButton, I have the pressed sprite and then after a really small amount of time (maybe one or two frame ?) the label change its position.
Maybe it's REALLY fast, but I can definitely see it...
-
If you can reproduce it with a simple scene (prefferably created with just NGUI package's assets), send it to support at tasharen.com, it might help.
-
Thanks for the suggestion,
As requested, it has been sent to your inbox,
I hope it will go through (25Mo...)
Also, it seems that when I put a delay of 0, it takes a delay of 1 instead, so after checking your code, I've put -1.
-
We have received the package and have already fixed the offending code.
I have attached the changed file if you wish to use it right away. Other wise it will be in the next update
-
Awesome developers are awesome ;)
-
Just to say that it's working perfectly now :)
I've noticed that you've added a Bounce method, are you planning to make Bounce In & Bounce Out ?
Thanks again.
-
Changing the direction changes between bounce in and bounce out (or at least i believe it does).
-
Hi !
What do you mean by changing direction ? Because I'm using the toggle direction that should change it, and it's not working as wanted.
You can see this, right here : http://www.youtube.com/watch?v=eu-rWnf8Qj8
-
Ah I see, I do see what you mean, and sure I can add the other direction (99.9% sure at least). Give me some time.
-
Should be done just need to do a new release.
-
Awesome support ! As always ;)