mirror of
https://github.com/Cardidi/dotween-upm-fork.git
synced 2025-12-20 17:26:03 +08:00
[BUGFIX] Fixed issue where zero-duration nested tweens inside 0-duration parent Sequences didn't fire OnStepComplete and OnComplete callbacks
This commit is contained in:
parent
5d29618545
commit
a647318c24
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -648,7 +648,7 @@ namespace DG.Tweening.Core
|
||||
t.delayComplete = true;
|
||||
t.elapsedDelay = t.delay;
|
||||
// int toCompletedLoops = (int)(to / t.duration); // With very small floats creates floating points imprecisions
|
||||
int toCompletedLoops = Mathf.FloorToInt(to / t.duration); // Still generates imprecision with some values (like 0.4)
|
||||
int toCompletedLoops = t.duration <= 0 ? 1 : Mathf.FloorToInt(to / t.duration); // Still generates imprecision with some values (like 0.4)
|
||||
// int toCompletedLoops = (int)((decimal)to / (decimal)t.duration); // Takes care of floating points imprecision (nahh doesn't work correctly either)
|
||||
float toPosition = to % t.duration;
|
||||
if (t.loops != -1 && toCompletedLoops >= t.loops) {
|
||||
|
||||
@ -32,7 +32,7 @@ namespace DG.Tweening
|
||||
public class DOTween
|
||||
{
|
||||
/// <summary>DOTween's version</summary>
|
||||
public static readonly string Version = "1.2.060"; // Last version before modules: 1.1.755
|
||||
public static readonly string Version = "1.2.065"; // Last version before modules: 1.1.755
|
||||
|
||||
///////////////////////////////////////////////
|
||||
// Options ////////////////////////////////////
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user