Skip to content

Commit

Permalink
refactor: AnimationCurveAnimator
Browse files Browse the repository at this point in the history
  • Loading branch information
kyubuns committed Feb 15, 2018
1 parent 0ffc620 commit 9740d26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ public static partial class Motion
{
public static IAnimator From(AnimationCurve curve, float velocity = 1.0f)
{
return new AnimationCurveAnimator(curve, velocity);
return new AnimationCurveVelocityAnimator(curve, velocity);
}

public static IAnimator From(AnimationCurve curve, TimeSpan duration)
{
return new AnimationCurveTimeAnimator(curve, duration);
}

private class AnimationCurveAnimator : IAnimator
private class AnimationCurveVelocityAnimator : IAnimator
{
private readonly AnimationCurve curve;
private readonly float velocity;

public AnimationCurveAnimator(AnimationCurve curve, float velocity)
public AnimationCurveVelocityAnimator(AnimationCurve curve, float velocity)
{
this.curve = curve;
this.velocity = velocity;
Expand Down

0 comments on commit 9740d26

Please sign in to comment.