Adjust transitions slightly

This commit is contained in:
Dean Herbert 2019-12-12 16:09:50 +09:00
parent 3ccfee64f6
commit 94f3dbb2f6
1 changed files with 9 additions and 9 deletions

View File

@ -24,8 +24,8 @@ namespace osu.Game.Screens.Play
{ {
public class HUDOverlay : Container public class HUDOverlay : Container
{ {
private const int duration = 250; private const int fade_duration = 400;
private const Easing easing = Easing.OutQuint; private const Easing fade_easing = Easing.Out;
public readonly KeyCounterDisplay KeyCounter; public readonly KeyCounterDisplay KeyCounter;
public readonly RollingCounter<int> ComboCounter; public readonly RollingCounter<int> ComboCounter;
@ -103,8 +103,8 @@ public HUDOverlay(ScoreProcessor scoreProcessor, DrawableRuleset drawableRuleset
Origin = Anchor.BottomRight, Origin = Anchor.BottomRight,
Position = -new Vector2(5, TwoLayerButton.SIZE_RETRACTED.Y), Position = -new Vector2(5, TwoLayerButton.SIZE_RETRACTED.Y),
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
AutoSizeDuration = 150, AutoSizeDuration = fade_duration,
AutoSizeEasing = Easing.OutQuint, AutoSizeEasing = fade_easing,
Direction = FillDirection.Vertical, Direction = FillDirection.Vertical,
Children = new Drawable[] Children = new Drawable[]
{ {
@ -155,19 +155,19 @@ protected override void LoadComplete()
{ {
base.LoadComplete(); base.LoadComplete();
ShowHud.BindValueChanged(visible => hideTargets.ForEach(d => d.FadeTo(visible.NewValue ? 1 : 0, duration, easing))); ShowHud.BindValueChanged(visible => hideTargets.ForEach(d => d.FadeTo(visible.NewValue ? 1 : 0, fade_duration, fade_easing)));
ShowHealthbar.BindValueChanged(healthBar => ShowHealthbar.BindValueChanged(healthBar =>
{ {
if (healthBar.NewValue) if (healthBar.NewValue)
{ {
HealthDisplay.FadeIn(duration, easing); HealthDisplay.FadeIn(fade_duration, fade_easing);
topScoreContainer.MoveToY(30, duration, easing); topScoreContainer.MoveToY(30, fade_duration, fade_easing);
} }
else else
{ {
HealthDisplay.FadeOut(duration, easing); HealthDisplay.FadeOut(fade_duration, fade_easing);
topScoreContainer.MoveToY(0, duration, easing); topScoreContainer.MoveToY(0, fade_duration, fade_easing);
} }
}, true); }, true);