-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEaseOutElasticAnimationT.cs
More file actions
26 lines (23 loc) · 972 Bytes
/
EaseOutElasticAnimationT.cs
File metadata and controls
26 lines (23 loc) · 972 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
namespace BrainbeanApps.ValueAnimation
{
public class EaseOutElasticAnimation<T> : BaseElasticAnimation<T>, IValueAnimation<T>
where T : struct, IComparable
{
public EaseOutElasticAnimation(int oscillations = ElasticAnimation.DefaultOscillations,
float springiness = ElasticAnimation.DefalutSpringiness)
: this(ValueAnimation.ValueOperations.For<T>(), oscillations, springiness)
{
}
public EaseOutElasticAnimation(IValueOperations<T> valueOperations,
int oscillations = ElasticAnimation.DefaultOscillations,
float springiness = ElasticAnimation.DefalutSpringiness)
: base(valueOperations, oscillations, springiness)
{
}
public T GetValue(float currentTime, float duration, T initialValue, T deltaValue)
{
return base.GetValue(currentTime, duration, initialValue, deltaValue, true);
}
}
}