mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 03:35:10 +00:00
Instant camera easing
This commit is contained in:
parent
5098ca135d
commit
49b1f9a5c2
1 changed files with 11 additions and 0 deletions
|
@ -64,6 +64,7 @@ namespace RhythmHeavenMania.Util
|
|||
public enum Ease
|
||||
{
|
||||
Linear = 0,
|
||||
Instant,
|
||||
EaseInQuad,
|
||||
EaseOutQuad,
|
||||
EaseInOutQuad,
|
||||
|
@ -108,6 +109,11 @@ namespace RhythmHeavenMania.Util
|
|||
return Mathf.Lerp(start, end, value);
|
||||
}
|
||||
|
||||
public static float Instant(float start, float end, float value)
|
||||
{
|
||||
return Mathf.Lerp(end, end, value);
|
||||
}
|
||||
|
||||
public static float Spring(float start, float end, float value)
|
||||
{
|
||||
value = Mathf.Clamp01(value);
|
||||
|
@ -773,6 +779,11 @@ namespace RhythmHeavenMania.Util
|
|||
/// <returns>The easing function</returns>
|
||||
public static Function GetEasingFunction(Ease easingFunction)
|
||||
{
|
||||
if (easingFunction == Ease.Instant)
|
||||
{
|
||||
return Instant;
|
||||
}
|
||||
|
||||
if (easingFunction == Ease.EaseInQuad)
|
||||
{
|
||||
return EaseInQuad;
|
||||
|
|
Loading…
Reference in a new issue