1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-20 09:16:02 +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:
Demigiant 2018-08-07 13:52:20 +02:00
parent 5d29618545
commit a647318c24
13 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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.