Move constant local (and break line)

This commit is contained in:
Dean Herbert 2019-05-14 11:11:57 +09:00
parent 8c07f6b8ff
commit be6da833f8
1 changed files with 4 additions and 3 deletions

View File

@ -36,8 +36,6 @@ public void ApplyToDrawableHitObjects(IEnumerable<DrawableHitObject> drawables)
private class OsuFlashlight : Flashlight, IRequireHighFrequencyMousePosition
{
private const double follow_delay = 120;
public OsuFlashlight()
{
FlashlightSize = new Vector2(0, getSizeFor(0));
@ -51,10 +49,13 @@ public void OnSliderTrackingChange(ValueChangedEvent<bool> e)
protected override bool OnMouseMove(MouseMoveEvent e)
{
const double follow_delay = 120;
var position = FlashlightPosition;
var destination = e.MousePosition;
FlashlightPosition = Interpolation.ValueAt(MathHelper.Clamp(Clock.ElapsedFrameTime, 0, follow_delay), position, destination, 0, follow_delay, Easing.Out);
FlashlightPosition = Interpolation.ValueAt(
MathHelper.Clamp(Clock.ElapsedFrameTime, 0, follow_delay), position, destination, 0, follow_delay, Easing.Out);
return base.OnMouseMove(e);
}