From 39649747aaad9092a32d2d97e1897ecaecded170 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 20 Jun 2018 17:25:22 +0900 Subject: [PATCH] Simplify and synchronise multiplayer screen transitions --- .../Multi/Screens/MultiplayerScreen.cs | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/osu.Game/Screens/Multi/Screens/MultiplayerScreen.cs b/osu.Game/Screens/Multi/Screens/MultiplayerScreen.cs index 327d21a589..00c2613d54 100644 --- a/osu.Game/Screens/Multi/Screens/MultiplayerScreen.cs +++ b/osu.Game/Screens/Multi/Screens/MultiplayerScreen.cs @@ -10,9 +10,6 @@ namespace osu.Game.Screens.Multi.Screens { public abstract class MultiplayerScreen : OsuScreen { - private const Easing in_easing = Easing.OutQuint; - private const Easing out_easing = Easing.InSine; - protected virtual Container TransitionContent => Content; /// @@ -24,17 +21,15 @@ namespace osu.Game.Screens.Multi.Screens { base.OnEntering(last); - TransitionContent.MoveToX(200); - - Content.FadeInFromZero(WaveContainer.APPEAR_DURATION, in_easing); - TransitionContent.FadeInFromZero(WaveContainer.APPEAR_DURATION, in_easing); - TransitionContent.MoveToX(0, WaveContainer.APPEAR_DURATION, in_easing); + Content.FadeInFromZero(WaveContainer.APPEAR_DURATION, Easing.OutQuint); + TransitionContent.FadeInFromZero(WaveContainer.APPEAR_DURATION, Easing.OutQuint); + TransitionContent.MoveToX(200).MoveToX(0, WaveContainer.APPEAR_DURATION, Easing.OutQuint); } protected override bool OnExiting(Screen next) { - Content.FadeOut(WaveContainer.DISAPPEAR_DURATION, out_easing); - TransitionContent.MoveToX(200, WaveContainer.DISAPPEAR_DURATION, out_easing); + Content.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.OutQuint); + TransitionContent.MoveToX(200, WaveContainer.DISAPPEAR_DURATION, Easing.OutQuint); return base.OnExiting(next); } @@ -43,16 +38,16 @@ namespace osu.Game.Screens.Multi.Screens { base.OnResuming(last); - Content.FadeIn(WaveContainer.APPEAR_DURATION, in_easing); - TransitionContent.MoveToX(0, WaveContainer.APPEAR_DURATION, in_easing); + Content.FadeIn(WaveContainer.APPEAR_DURATION, Easing.OutQuint); + TransitionContent.MoveToX(0, WaveContainer.APPEAR_DURATION, Easing.OutQuint); } protected override void OnSuspending(Screen next) { base.OnSuspending(next); - Content.FadeOut(WaveContainer.DISAPPEAR_DURATION, out_easing); - TransitionContent.MoveToX(-200, WaveContainer.DISAPPEAR_DURATION, out_easing); + Content.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.OutQuint); + TransitionContent.MoveToX(-200, WaveContainer.DISAPPEAR_DURATION, Easing.OutQuint); } } }