Skip to content

Commit

Permalink
Rename Continue() -> Next()
Browse files Browse the repository at this point in the history
  • Loading branch information
smoogipoo committed Oct 3, 2024
1 parent 18ffd60 commit c56bf9c
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 50 deletions.
8 changes: 4 additions & 4 deletions osu.Framework/Audio/IAdjustableAudioComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public static TransformSequence<T> TempoTo<T, TEasing>(this T component, double
public static TransformSequence<T> VolumeTo<T, TEasing>(this TransformSequence<T> sequence, double newVolume, double duration, TEasing easing)
where T : class, IAdjustableAudioComponent, IDrawable
where TEasing : IEasingFunction
=> sequence.Continue(out T t).TransformBindableTo(t.Volume, newVolume, duration, easing);
=> sequence.Next(out T t).TransformBindableTo(t.Volume, newVolume, duration, easing);

/// <summary>
/// Smoothly adjusts <see cref="IAdjustableAudioComponent.Balance"/> over time.
Expand All @@ -187,7 +187,7 @@ public static TransformSequence<T> VolumeTo<T, TEasing>(this TransformSequence<T
public static TransformSequence<T> BalanceTo<T, TEasing>(this TransformSequence<T> sequence, double newBalance, double duration, TEasing easing)
where T : class, IAdjustableAudioComponent, IDrawable
where TEasing : IEasingFunction
=> sequence.Continue(out T t).TransformBindableTo(t.Balance, newBalance, duration, easing);
=> sequence.Next(out T t).TransformBindableTo(t.Balance, newBalance, duration, easing);

/// <summary>
/// Smoothly adjusts <see cref="IAdjustableAudioComponent.Frequency"/> over time.
Expand All @@ -196,7 +196,7 @@ public static TransformSequence<T> BalanceTo<T, TEasing>(this TransformSequence<
public static TransformSequence<T> FrequencyTo<T, TEasing>(this TransformSequence<T> sequence, double newFrequency, double duration, TEasing easing)
where T : class, IAdjustableAudioComponent, IDrawable
where TEasing : IEasingFunction
=> sequence.Continue(out T t).TransformBindableTo(t.Frequency, newFrequency, duration, easing);
=> sequence.Next(out T t).TransformBindableTo(t.Frequency, newFrequency, duration, easing);

/// <summary>
/// Smoothly adjusts <see cref="IAdjustableAudioComponent.Tempo"/> over time.
Expand All @@ -205,7 +205,7 @@ public static TransformSequence<T> FrequencyTo<T, TEasing>(this TransformSequenc
public static TransformSequence<T> TempoTo<T, TEasing>(this TransformSequence<T> sequence, double newTempo, double duration, TEasing easing)
where T : class, IAdjustableAudioComponent, IDrawable
where TEasing : IEasingFunction
=> sequence.Continue(out T t).TransformBindableTo(t.Tempo, newTempo, duration, easing);
=> sequence.Next(out T t).TransformBindableTo(t.Tempo, newTempo, duration, easing);

#endregion
}
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework/Graphics/Containers/ModelBackedDrawable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ private void finishLoad(DelayedLoadWrapper? wrapper)
if (wrapper == null)
hideTransforms = ApplyHideTransforms(lastWrapper);
else if (lastWrapper is Drawable last)
hideTransforms = last.Delay(TransformDuration).Continue(ApplyHideTransforms);
hideTransforms = last.Delay(TransformDuration).Next(ApplyHideTransforms);

// Expire the last wrapper after the front-most transform has completed (the last wrapper is assumed to be invisible by that point)
if (!showTransforms.IsEmpty)
Expand Down
72 changes: 36 additions & 36 deletions osu.Framework/Graphics/TransformSequenceExtensions.cs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions osu.Framework/Graphics/TransformableExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ public static TransformSequence<T> Animate<T>(this T transformable, params Trans
var branch = TransformSequence<T>.Create(transformable).CreateBranch();

foreach (var gen in childGenerators)
branch.Commit(branch.Head.Continue(gen));
branch.Commit(branch.Head.Next(gen));

return branch.Merge();
}
Expand All @@ -736,7 +736,7 @@ public static TransformSequence<T> Loop<T>(this T transformable, double pause, i
var branch = TransformSequence<T>.Create(transformable).CreateBranch();

foreach (var gen in childGenerators)
branch.Commit(branch.Head.Continue(gen));
branch.Commit(branch.Head.Next(gen));
branch.Commit(branch.Head.Loop(pause, numIters));

return branch.Merge();
Expand Down
10 changes: 5 additions & 5 deletions osu.Framework/Graphics/Transforms/TransformSequence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,21 +115,21 @@ static void throwTargetTypeMismatch(Type expected, Type actual)
/// Continues with an action on the target.
/// </summary>
[MustUseReturnValue]
public TransformSequence<T> Continue(Generator generator)
=> generator(Continue());
public TransformSequence<T> Next(Generator generator)
=> generator(Next());

/// <summary>
/// Continues with an action on the target.
/// </summary>
[MustUseReturnValue]
public T Continue()
=> Continue(out _);
public T Next()
=> Next(out _);

/// <summary>
/// Continues with an action on the target.
/// </summary>
[MustUseReturnValue]
public T Continue(out T continuationTarget)
public T Next(out T continuationTarget)
{
TransformSequenceHelpers.SaveContext(new Context(this));
continuationTarget = target;
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework/Graphics/UserInterface/CircularProgress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,6 @@ public static TransformSequence<CircularProgress> ProgressTo(this TransformSeque

public static TransformSequence<CircularProgress> ProgressTo<TEasing>(this TransformSequence<CircularProgress> t, double newValue, double duration, TEasing easing)
where TEasing : IEasingFunction
=> t.Continue().ProgressTo(newValue, duration, easing);
=> t.Next().ProgressTo(newValue, duration, easing);
}
}
2 changes: 1 addition & 1 deletion osu.Framework/Graphics/UserInterface/Counter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ public TransformSequence<Counter> CountTo(double endCount, double duration = 0,
public static class CounterTransformSequenceExtensions
{
public static TransformSequence<Counter> CountTo(this TransformSequence<Counter> t, double endCount, double duration = 0, Easing easing = Easing.None)
=> t.Continue().CountTo(endCount, duration, easing);
=> t.Next().CountTo(endCount, duration, easing);
}
}

0 comments on commit c56bf9c

Please sign in to comment.