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:
// Create a tween sequence for the Option buttons stack
_seqOptions = DOTween.Sequence()
.SetAutoKill(false)
.SetRelative(true)
.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:
if (_optionsExpandedState)
{
_seqOptions.SetEase(Ease.OutBounce).PlayForward();
}
else
{
_seqOptions.SetEase(Ease.InBounce).PlayBackwards();
}
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.
Jeff