mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Rename EasingTypes to Easing
This commit is contained in:
@ -128,14 +128,14 @@ namespace osu.Game.Screens.Menu
|
||||
bool rightward = beatIndex % 2 == 1;
|
||||
double duration = timingPoint.BeatLength / 2;
|
||||
|
||||
icon.RotateTo(rightward ? 10 : -10, duration * 2, EasingTypes.InOutSine);
|
||||
icon.RotateTo(rightward ? 10 : -10, duration * 2, Easing.InOutSine);
|
||||
|
||||
icon.Animate(
|
||||
i => i.MoveToY(-10, duration, EasingTypes.Out),
|
||||
i => i.ScaleTo(1, duration, EasingTypes.Out)
|
||||
i => i.MoveToY(-10, duration, Easing.Out),
|
||||
i => i.ScaleTo(1, duration, Easing.Out)
|
||||
).Then(
|
||||
i => i.MoveToY(0, duration, EasingTypes.In),
|
||||
i => i.ScaleTo(new Vector2(1, 0.9f), duration, EasingTypes.In)
|
||||
i => i.MoveToY(0, duration, Easing.In),
|
||||
i => i.ScaleTo(new Vector2(1, 0.9f), duration, Easing.In)
|
||||
);
|
||||
}
|
||||
|
||||
@ -145,25 +145,25 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
sampleHover?.Play();
|
||||
|
||||
box.ScaleTo(new Vector2(1.5f, 1), 500, EasingTypes.OutElastic);
|
||||
box.ScaleTo(new Vector2(1.5f, 1), 500, Easing.OutElastic);
|
||||
|
||||
double duration = TimeUntilNextBeat;
|
||||
|
||||
icon.ClearTransforms();
|
||||
icon.RotateTo(10, duration, EasingTypes.InOutSine);
|
||||
icon.ScaleTo(new Vector2(1, 0.9f), duration, EasingTypes.Out);
|
||||
icon.RotateTo(10, duration, Easing.InOutSine);
|
||||
icon.ScaleTo(new Vector2(1, 0.9f), duration, Easing.Out);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(InputState state)
|
||||
{
|
||||
icon.ClearTransforms();
|
||||
icon.RotateTo(0, 500, EasingTypes.Out);
|
||||
icon.MoveTo(Vector2.Zero, 500, EasingTypes.Out);
|
||||
icon.ScaleTo(Vector2.One, 200, EasingTypes.Out);
|
||||
icon.RotateTo(0, 500, Easing.Out);
|
||||
icon.MoveTo(Vector2.Zero, 500, Easing.Out);
|
||||
icon.ScaleTo(Vector2.One, 200, Easing.Out);
|
||||
|
||||
if (State == ButtonState.Expanded)
|
||||
box.ScaleTo(new Vector2(1, 1), 500, EasingTypes.OutElastic);
|
||||
box.ScaleTo(new Vector2(1, 1), 500, Easing.OutElastic);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
@ -176,13 +176,13 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||
{
|
||||
boxHoverLayer.FadeTo(0.1f, 1000, EasingTypes.OutQuint);
|
||||
boxHoverLayer.FadeTo(0.1f, 1000, Easing.OutQuint);
|
||||
return base.OnMouseDown(state, args);
|
||||
}
|
||||
|
||||
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
||||
{
|
||||
boxHoverLayer.FadeTo(0, 1000, EasingTypes.OutQuint);
|
||||
boxHoverLayer.FadeTo(0, 1000, Easing.OutQuint);
|
||||
return base.OnMouseUp(state, args);
|
||||
}
|
||||
|
||||
@ -214,7 +214,7 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
boxHoverLayer.ClearTransforms();
|
||||
boxHoverLayer.Alpha = 0.9f;
|
||||
boxHoverLayer.FadeOut(800, EasingTypes.OutExpo);
|
||||
boxHoverLayer.FadeOut(800, Easing.OutExpo);
|
||||
}
|
||||
|
||||
public override bool HandleInput => state != ButtonState.Exploded && box.Scale.X >= 0.8f;
|
||||
@ -246,23 +246,23 @@ namespace osu.Game.Screens.Menu
|
||||
switch (ContractStyle)
|
||||
{
|
||||
default:
|
||||
box.ScaleTo(new Vector2(0, 1), 500, EasingTypes.OutExpo);
|
||||
box.ScaleTo(new Vector2(0, 1), 500, Easing.OutExpo);
|
||||
this.FadeOut(500);
|
||||
break;
|
||||
case 1:
|
||||
box.ScaleTo(new Vector2(0, 1), 400, EasingTypes.InSine);
|
||||
box.ScaleTo(new Vector2(0, 1), 400, Easing.InSine);
|
||||
this.FadeOut(800);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ButtonState.Expanded:
|
||||
const int expand_duration = 500;
|
||||
box.ScaleTo(new Vector2(1, 1), expand_duration, EasingTypes.OutExpo);
|
||||
box.ScaleTo(new Vector2(1, 1), expand_duration, Easing.OutExpo);
|
||||
this.FadeIn(expand_duration / 6f);
|
||||
break;
|
||||
case ButtonState.Exploded:
|
||||
const int explode_duration = 200;
|
||||
box.ScaleTo(new Vector2(2, 1), explode_duration, EasingTypes.OutExpo);
|
||||
box.ScaleTo(new Vector2(2, 1), explode_duration, Easing.OutExpo);
|
||||
this.FadeOut(explode_duration / 4f * 3);
|
||||
break;
|
||||
}
|
||||
|
@ -224,13 +224,13 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
case MenuState.Exit:
|
||||
case MenuState.Initial:
|
||||
buttonAreaBackground.ScaleTo(Vector2.One, 500, EasingTypes.Out);
|
||||
buttonAreaBackground.ScaleTo(Vector2.One, 500, Easing.Out);
|
||||
buttonArea.FadeOut(300);
|
||||
|
||||
osuLogo.Delay(150)
|
||||
.Schedule(() => toolbar?.Hide())
|
||||
.ScaleTo(1, 800, EasingTypes.OutExpo)
|
||||
.MoveTo(Vector2.Zero, 800, EasingTypes.OutExpo);
|
||||
.ScaleTo(1, 800, Easing.OutExpo)
|
||||
.MoveTo(Vector2.Zero, 800, Easing.OutExpo);
|
||||
|
||||
foreach (Button b in buttonsTopLevel)
|
||||
b.State = ButtonState.Contracted;
|
||||
@ -247,11 +247,11 @@ namespace osu.Game.Screens.Menu
|
||||
sampleBack?.Play();
|
||||
break;
|
||||
case MenuState.TopLevel:
|
||||
buttonAreaBackground.ScaleTo(Vector2.One, 200, EasingTypes.Out);
|
||||
buttonAreaBackground.ScaleTo(Vector2.One, 200, Easing.Out);
|
||||
|
||||
var sequence = osuLogo
|
||||
.ScaleTo(0.5f, 200, EasingTypes.In)
|
||||
.MoveTo(buttonFlow.DrawPosition, 200, EasingTypes.In);
|
||||
.ScaleTo(0.5f, 200, Easing.In)
|
||||
.MoveTo(buttonFlow.DrawPosition, 200, Easing.In);
|
||||
|
||||
if (fromInitial && osuLogo.Scale.X > 0.5f)
|
||||
sequence.OnComplete(o =>
|
||||
@ -276,7 +276,7 @@ namespace osu.Game.Screens.Menu
|
||||
b.State = ButtonState.Expanded;
|
||||
break;
|
||||
case MenuState.EnteringMode:
|
||||
buttonAreaBackground.ScaleTo(new Vector2(2, 0), 300, EasingTypes.InSine);
|
||||
buttonAreaBackground.ScaleTo(new Vector2(2, 0), 300, Easing.InSine);
|
||||
|
||||
buttonsTopLevel.ForEach(b => b.ContractStyle = 1);
|
||||
buttonsPlay.ForEach(b => b.ContractStyle = 1);
|
||||
|
@ -134,8 +134,8 @@ namespace osu.Game.Screens.Menu
|
||||
logo.ScaleTo(0.4f);
|
||||
logo.FadeOut();
|
||||
|
||||
logo.ScaleTo(1, 4400, EasingTypes.OutQuint);
|
||||
logo.FadeIn(20000, EasingTypes.OutQuint);
|
||||
logo.ScaleTo(1, 4400, Easing.OutQuint);
|
||||
logo.FadeIn(20000, Easing.OutQuint);
|
||||
}
|
||||
|
||||
protected override void OnSuspending(Screen next)
|
||||
|
@ -118,10 +118,10 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
buttons.State = MenuState.EnteringMode;
|
||||
|
||||
Content.FadeOut(length, EasingTypes.InSine);
|
||||
Content.MoveTo(new Vector2(-800, 0), length, EasingTypes.InSine);
|
||||
Content.FadeOut(length, Easing.InSine);
|
||||
Content.MoveTo(new Vector2(-800, 0), length, Easing.InSine);
|
||||
|
||||
sideFlashes.FadeOut(length / 4, EasingTypes.OutQuint);
|
||||
sideFlashes.FadeOut(length / 4, Easing.OutQuint);
|
||||
}
|
||||
|
||||
protected override void OnResuming(Screen last)
|
||||
@ -137,10 +137,10 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
buttons.State = MenuState.TopLevel;
|
||||
|
||||
Content.FadeIn(length, EasingTypes.OutQuint);
|
||||
Content.MoveTo(new Vector2(0, 0), length, EasingTypes.OutQuint);
|
||||
Content.FadeIn(length, Easing.OutQuint);
|
||||
Content.MoveTo(new Vector2(0, 0), length, Easing.OutQuint);
|
||||
|
||||
sideFlashes.FadeIn(length / 4, EasingTypes.InQuint);
|
||||
sideFlashes.FadeIn(length / 4, Easing.InQuint);
|
||||
}
|
||||
|
||||
protected override bool OnExiting(Screen next)
|
||||
|
@ -92,7 +92,7 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
d.FadeTo(Math.Max(0, ((d.Equals(leftBox) ? amplitudes.LeftChannel : amplitudes.RightChannel) - amplitude_dead_zone) / (kiai ? kiai_multiplier : alpha_multiplier)), box_fade_in_time)
|
||||
.Then()
|
||||
.FadeOut(beatLength, EasingTypes.In);
|
||||
.FadeOut(beatLength, Easing.In);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -240,27 +240,27 @@ namespace osu.Game.Screens.Menu
|
||||
this.Delay(early_activation).Schedule(() => sampleBeat.Play());
|
||||
|
||||
logoBeatContainer
|
||||
.ScaleTo(1 - 0.02f * amplitudeAdjust, early_activation, EasingTypes.Out)
|
||||
.ScaleTo(1 - 0.02f * amplitudeAdjust, early_activation, Easing.Out)
|
||||
.Then()
|
||||
.ScaleTo(1, beatLength * 2, EasingTypes.OutQuint);
|
||||
.ScaleTo(1, beatLength * 2, Easing.OutQuint);
|
||||
|
||||
ripple.ClearTransforms();
|
||||
ripple
|
||||
.ScaleTo(logoAmplitudeContainer.Scale)
|
||||
.ScaleTo(logoAmplitudeContainer.Scale * (1 + 0.04f * amplitudeAdjust), beatLength, EasingTypes.OutQuint)
|
||||
.FadeTo(0.15f * amplitudeAdjust).FadeOut(beatLength, EasingTypes.OutQuint);
|
||||
.ScaleTo(logoAmplitudeContainer.Scale * (1 + 0.04f * amplitudeAdjust), beatLength, Easing.OutQuint)
|
||||
.FadeTo(0.15f * amplitudeAdjust).FadeOut(beatLength, Easing.OutQuint);
|
||||
|
||||
if (effectPoint.KiaiMode && flashLayer.Alpha < 0.4f)
|
||||
{
|
||||
flashLayer.ClearTransforms();
|
||||
flashLayer
|
||||
.FadeTo(0.2f * amplitudeAdjust, early_activation, EasingTypes.Out)
|
||||
.FadeTo(0.2f * amplitudeAdjust, early_activation, Easing.Out)
|
||||
.Then()
|
||||
.FadeOut(beatLength);
|
||||
|
||||
visualizer.ClearTransforms();
|
||||
visualizer
|
||||
.FadeTo(0.9f * amplitudeAdjust, early_activation, EasingTypes.Out)
|
||||
.FadeTo(0.9f * amplitudeAdjust, early_activation, Easing.Out)
|
||||
.Then()
|
||||
.FadeTo(0.5f, beatLength);
|
||||
}
|
||||
@ -274,7 +274,7 @@ namespace osu.Game.Screens.Menu
|
||||
const float velocity_adjust_cutoff = 0.98f;
|
||||
|
||||
var maxAmplitude = lastBeatIndex >= 0 ? Beatmap.Value.Track?.CurrentAmplitudes.Maximum ?? 0 : 0;
|
||||
logoAmplitudeContainer.ScaleTo(1 - Math.Max(0, maxAmplitude - scale_adjust_cutoff) * 0.04f, 75, EasingTypes.OutQuint);
|
||||
logoAmplitudeContainer.ScaleTo(1 - Math.Max(0, maxAmplitude - scale_adjust_cutoff) * 0.04f, 75, Easing.OutQuint);
|
||||
|
||||
if (maxAmplitude > velocity_adjust_cutoff)
|
||||
triangles.Velocity = 1 + Math.Max(0, maxAmplitude - velocity_adjust_cutoff) * 50;
|
||||
@ -286,13 +286,13 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
if (!Interactive) return false;
|
||||
|
||||
logoBounceContainer.ScaleTo(0.9f, 1000, EasingTypes.Out);
|
||||
logoBounceContainer.ScaleTo(0.9f, 1000, Easing.Out);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
||||
{
|
||||
logoBounceContainer.ScaleTo(1f, 500, EasingTypes.OutElastic);
|
||||
logoBounceContainer.ScaleTo(1f, 500, Easing.OutElastic);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -304,7 +304,7 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
flashLayer.ClearTransforms();
|
||||
flashLayer.Alpha = 0.4f;
|
||||
flashLayer.FadeOut(1500, EasingTypes.OutExpo);
|
||||
flashLayer.FadeOut(1500, Easing.OutExpo);
|
||||
|
||||
Action?.Invoke();
|
||||
return true;
|
||||
@ -314,18 +314,18 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
if (!Interactive) return false;
|
||||
|
||||
logoHoverContainer.ScaleTo(1.1f, 500, EasingTypes.OutElastic);
|
||||
logoHoverContainer.ScaleTo(1.1f, 500, Easing.OutElastic);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(InputState state)
|
||||
{
|
||||
logoHoverContainer.ScaleTo(1, 500, EasingTypes.OutElastic);
|
||||
logoHoverContainer.ScaleTo(1, 500, Easing.OutElastic);
|
||||
}
|
||||
|
||||
public void Impact()
|
||||
{
|
||||
impactContainer.FadeOutFromOne(250, EasingTypes.In);
|
||||
impactContainer.FadeOutFromOne(250, Easing.In);
|
||||
impactContainer.ScaleTo(0.96f);
|
||||
impactContainer.ScaleTo(1.12f, 250);
|
||||
}
|
||||
|
Reference in New Issue
Block a user