Item timing #6
-
Hi there, When I change the value of |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi, I think there are two ways to prevent overlaps. First wayThe first way is to change the public class ItemsMoveJob : MoveJob
{
...
public override async UniTask ExecuteAsync(CancellationToken cancellationToken = default)
{
var itemsSequence = DOTween.Sequence();
foreach (var itemData in _itemsData)
{
var itemMoveTween = CreateItemMoveTween(itemData);
// Use your own math here.
var rowIndexBasedInterval = (1 - itemData.RowIndex / 10.0f) * IntervalDuration;
_ = itemsSequence
.Join(itemMoveTween)
.PrependInterval(itemMoveTween.Duration() * rowIndexBasedInterval);
}
...
}
}
Second wayThe second way is to implement a new fill strategy that constructs item sequences in the right order to meet requirements. |
Beta Was this translation helpful? Give feedback.
-
Thanks. I will prefer the first way. |
Beta Was this translation helpful? Give feedback.
Hi,
I think there are two ways to prevent overlaps.
First way
The first way is to change the
PrependInterval
based on the itemRowIndex
(for example).