Skip to content

Commit

Permalink
fix: float誤差によりdurationに非常に小さい値を入れると続きのアニメーションが途中で中断されることがある
Browse files Browse the repository at this point in the history
  • Loading branch information
kyubuns committed Mar 18, 2021
1 parent 93c7bae commit 6d28f3f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Assets/AnimeTask/Scripts/Animator/ConcatAnimator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ public ConcatAnimator(IAnimator<T> animator1, IEnumerable<IConcatableAnimator<T>
{
while (true)
{
var f = time - usedTime;
if (currentAnimator == null) return (currentValue, usedTime);
var (v, used) = currentAnimator.Update(time - usedTime);
var (v, used) = currentAnimator.Update(f);

if (used < time - usedTime)
if (used < f)
{
currentValue = v;
usedTime += used;
Expand Down

0 comments on commit 6d28f3f

Please sign in to comment.