Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - jgodfrey

Pages: 1 [2]
DOTween & DOTween Pro / Re: Changing Duration After Start
« on: February 01, 2016, 06:50:05 PM »
I'm a *very* new DOTween User, so I may be off base here, but...  To slow the tween down, I'd think you could simply set its time scale prior to the PlayBackwards() call.  So, something like this:

Code: [Select]
            else if (transform.position.z > initialPositionZ)
                forwardBoostTween.timeScale = 0.5f;

DOTween & DOTween Pro / Sequence - basic usage verification
« on: February 01, 2016, 03:04:51 AM »
As a new User, I just wanted to verify my usage of a typical DOTween sequence.  I've have a group of UI buttons that are "stacked" directly on top of each other (so, only the top one is visible).  When the visible button is pressed, I "expand" the underlying stack by tweening each of the buttons to their final, expanded positions.  Here's my basic sequence to do that:

Code: [Select]
        // Create a tween sequence for the Option buttons stack
        _seqOptions = DOTween.Sequence()
            .Join(transInfo.DOAnchorPosY(600, ButtonExpandTime, true))
            .Join(transMusic.DOAnchorPosY(400, ButtonExpandTime, true))
            .Join(transSoundFx.DOAnchorPosY(200, ButtonExpandTime, true));

Then, based on the value of a bool, I play the above sequence either forward (to expand the stack) or backwards (to collapse the stack).  That looks like this:

Code: [Select]
        if (_optionsExpandedState)

Notice that I have to switch the Ease property based on the direction - to get the same look in both cases. 

All of the above works exactly as intended. However, I just wanted to verify that it's a reasonable solution for what I'm doing.  Thanks for any input/verification you can provide and also for what looks to be a fantastic tweening library.


Pages: 1 [2]