using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TJAPlayer3.Animations
{
///
/// イーズインを行うクラス。
///
class EaseIn : Animator
{
///
/// イーズインを初期化します。
///
/// 始点。
/// 終点。
/// イージングにかける時間。
public EaseIn(int startPoint, int endPoint, int timeMs) : base(0, timeMs, 1, false)
{
StartPoint = startPoint;
EndPoint = endPoint;
Sa = EndPoint - StartPoint;
TimeMs = timeMs;
}
public override object GetAnimation()
{
var persent = Counter.n現在の値 / (double)TimeMs;
return ((double)Sa * persent * persent * persent) + StartPoint;
}
private readonly int StartPoint;
private readonly int EndPoint;
private readonly int Sa;
private readonly int TimeMs;
}
}