From 3e0aaa1aa0ab8a3bf1bda52674b0d82c63ec313d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 23 May 2017 12:29:43 +0900 Subject: [PATCH 1/8] Add basic beat response to osu! logo --- .../Containers/BeatSyncedContainer.cs | 9 +- osu.Game/Screens/Menu/OsuLogo.cs | 173 ++++++++++-------- 2 files changed, 106 insertions(+), 76 deletions(-) diff --git a/osu.Game/Graphics/Containers/BeatSyncedContainer.cs b/osu.Game/Graphics/Containers/BeatSyncedContainer.cs index dfb742f7d1..b9a7183338 100644 --- a/osu.Game/Graphics/Containers/BeatSyncedContainer.cs +++ b/osu.Game/Graphics/Containers/BeatSyncedContainer.cs @@ -16,12 +16,19 @@ namespace osu.Game.Graphics.Containers private int lastBeat; private ControlPoint lastControlPoint; + /// + /// The amount of time before a beat we should fire . + /// This allows for adding easing to animations that may be synchronised to the beat. + /// + protected double EarlyActivationMilliseconds; + protected override void Update() { if (beatmap.Value?.Track == null) return; - double currentTrackTime = beatmap.Value.Track.CurrentTime; + double currentTrackTime = beatmap.Value.Track.CurrentTime + EarlyActivationMilliseconds; + ControlPoint overridePoint; ControlPoint controlPoint = beatmap.Value.Beatmap.TimingInfo.TimingPointAt(currentTrackTime, out overridePoint); diff --git a/osu.Game/Screens/Menu/OsuLogo.cs b/osu.Game/Screens/Menu/OsuLogo.cs index e28adeacff..5f9a3bf655 100644 --- a/osu.Game/Screens/Menu/OsuLogo.cs +++ b/osu.Game/Screens/Menu/OsuLogo.cs @@ -12,21 +12,24 @@ using osu.Framework.Graphics.Textures; using osu.Framework.Input; using osu.Game.Graphics; using osu.Game.Graphics.Backgrounds; +using osu.Game.Graphics.Containers; using OpenTK; using OpenTK.Graphics; +using osu.Game.Beatmaps.Timing; namespace osu.Game.Screens.Menu { /// /// osu! logo and its attachments (pulsing, visualiser etc.) /// - public class OsuLogo : Container + public class OsuLogo : BeatSyncedContainer { public readonly Color4 OsuPink = OsuColour.FromHex(@"e967a1"); private readonly Sprite logo; private readonly CircularContainer logoContainer; private readonly Container logoBounceContainer; + private readonly Container logoBeatContainer; private readonly Container logoHoverContainer; private SampleChannel sampleClick; @@ -67,8 +70,12 @@ namespace osu.Game.Screens.Menu private const float default_size = 480; + private const double beat_in_time = 60; + public OsuLogo() { + EarlyActivationMilliseconds = beat_in_time; + Size = new Vector2(default_size); Anchor = Anchor.Centre; @@ -78,109 +85,116 @@ namespace osu.Game.Screens.Menu Children = new Drawable[] { - logoBounceContainer = new Container + logoBeatContainer = new Container { AutoSizeAxes = Axes.Both, Children = new Drawable[] { - logoHoverContainer = new Container + logoBounceContainer = new Container { AutoSizeAxes = Axes.Both, Children = new Drawable[] { - new BufferedContainer + logoHoverContainer = new Container { AutoSizeAxes = Axes.Both, Children = new Drawable[] { - logoContainer = new CircularContainer + new BufferedContainer + { + AutoSizeAxes = Axes.Both, + Children = new Drawable[] + { + logoContainer = new CircularContainer + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + RelativeSizeAxes = Axes.Both, + Scale = new Vector2(0.88f), + Masking = true, + Children = new Drawable[] + { + colourAndTriangles = new Container + { + RelativeSizeAxes = Axes.Both, + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + Children = new Drawable[] + { + new Box + { + RelativeSizeAxes = Axes.Both, + Colour = OsuPink, + }, + new Triangles + { + TriangleScale = 4, + ColourLight = OsuColour.FromHex(@"ff7db7"), + ColourDark = OsuColour.FromHex(@"de5b95"), + RelativeSizeAxes = Axes.Both, + }, + } + }, + flashLayer = new Box + { + RelativeSizeAxes = Axes.Both, + BlendingMode = BlendingMode.Additive, + Colour = Color4.White, + Alpha = 0, + }, + }, + }, + logo = new Sprite + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + }, + } + }, + rippleContainer = new Container { Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, - Scale = new Vector2(0.88f), + Children = new Drawable[] + { + ripple = new Sprite + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + BlendingMode = BlendingMode.Additive, + Alpha = 0.15f + } + } + }, + impactContainer = new CircularContainer + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + Alpha = 0, + BorderColour = Color4.White, + RelativeSizeAxes = Axes.Both, + BorderThickness = 10, Masking = true, Children = new Drawable[] { - colourAndTriangles = new Container + new Box { RelativeSizeAxes = Axes.Both, - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - Children = new Drawable[] - { - new Box - { - RelativeSizeAxes = Axes.Both, - Colour = OsuPink, - }, - new Triangles - { - TriangleScale = 4, - ColourLight = OsuColour.FromHex(@"ff7db7"), - ColourDark = OsuColour.FromHex(@"de5b95"), - RelativeSizeAxes = Axes.Both, - }, - } - }, - flashLayer = new Box - { - RelativeSizeAxes = Axes.Both, - BlendingMode = BlendingMode.Additive, - Colour = Color4.White, + AlwaysPresent = true, Alpha = 0, - }, - }, + } + } }, - logo = new Sprite + new MenuVisualisation { Anchor = Anchor.Centre, Origin = Anchor.Centre, - }, - } - }, - rippleContainer = new Container - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - RelativeSizeAxes = Axes.Both, - Children = new Drawable[] - { - ripple = new Sprite - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - BlendingMode = BlendingMode.Additive, - Alpha = 0.15f - } - } - }, - impactContainer = new CircularContainer - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - Alpha = 0, - BorderColour = Color4.White, - RelativeSizeAxes = Axes.Both, - BorderThickness = 10, - Masking = true, - Children = new Drawable[] - { - new Box - { RelativeSizeAxes = Axes.Both, - AlwaysPresent = true, - Alpha = 0, + BlendingMode = BlendingMode.Additive, + Alpha = 0.2f, } } - }, - new MenuVisualisation - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - RelativeSizeAxes = Axes.Both, - BlendingMode = BlendingMode.Additive, - Alpha = 0.2f, } } } @@ -206,6 +220,15 @@ namespace osu.Game.Screens.Menu ripple.Loop(300); } + protected override void OnNewBeat(int newBeat, double beatLength, TimeSignatures timeSignature, bool kiai) + { + base.OnNewBeat(newBeat, beatLength, timeSignature, kiai); + + logoBeatContainer.ScaleTo(0.97f, beat_in_time, EasingTypes.Out); + using (logoBeatContainer.BeginDelayedSequence(beat_in_time)) + logoBeatContainer.ScaleTo(1, beatLength * 2, EasingTypes.OutQuint); + } + protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) { if (!Interactive) return false; From 73320f9a7ea8acd293830ee2af1053efc418f948 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 23 May 2017 15:29:23 +0900 Subject: [PATCH 2/8] Don't bounce the ripple Also ripple better. --- osu.Game/Screens/Menu/OsuLogo.cs | 57 ++++++++++++++++---------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/osu.Game/Screens/Menu/OsuLogo.cs b/osu.Game/Screens/Menu/OsuLogo.cs index 5f9a3bf655..738204e30e 100644 --- a/osu.Game/Screens/Menu/OsuLogo.cs +++ b/osu.Game/Screens/Menu/OsuLogo.cs @@ -85,7 +85,7 @@ namespace osu.Game.Screens.Menu Children = new Drawable[] { - logoBeatContainer = new Container + logoHoverContainer = new Container { AutoSizeAxes = Axes.Both, Children = new Drawable[] @@ -95,7 +95,23 @@ namespace osu.Game.Screens.Menu AutoSizeAxes = Axes.Both, Children = new Drawable[] { - logoHoverContainer = new Container + rippleContainer = new Container + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + RelativeSizeAxes = Axes.Both, + Children = new Drawable[] + { + ripple = new Sprite + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + BlendingMode = BlendingMode.Additive, + Alpha = 0 + } + } + }, + logoBeatContainer = new Container { AutoSizeAxes = Axes.Both, Children = new Drawable[] @@ -151,22 +167,6 @@ namespace osu.Game.Screens.Menu }, } }, - rippleContainer = new Container - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - RelativeSizeAxes = Axes.Both, - Children = new Drawable[] - { - ripple = new Sprite - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - BlendingMode = BlendingMode.Additive, - Alpha = 0.15f - } - } - }, impactContainer = new CircularContainer { Anchor = Anchor.Centre, @@ -211,22 +211,23 @@ namespace osu.Game.Screens.Menu ripple.Texture = textures.Get(@"Menu/logo"); } - protected override void LoadComplete() - { - base.LoadComplete(); - - ripple.ScaleTo(ripple.Scale * 1.1f, 500); - ripple.FadeOut(500); - ripple.Loop(300); - } - protected override void OnNewBeat(int newBeat, double beatLength, TimeSignatures timeSignature, bool kiai) { base.OnNewBeat(newBeat, beatLength, timeSignature, kiai); - logoBeatContainer.ScaleTo(0.97f, beat_in_time, EasingTypes.Out); + if (newBeat < 0) return; + + logoBeatContainer.ScaleTo(0.98f, beat_in_time, EasingTypes.Out); using (logoBeatContainer.BeginDelayedSequence(beat_in_time)) logoBeatContainer.ScaleTo(1, beatLength * 2, EasingTypes.OutQuint); + + ripple.ClearTransforms(); + + ripple.ScaleTo(Vector2.One); + ripple.Alpha = 0.15f; + + ripple.ScaleTo(ripple.Scale * 1.04f, beatLength, EasingTypes.OutQuint); + ripple.FadeOut(beatLength); } protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) From 2decb2b2ff929f5a782592a1563fb32073b429ef Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 23 May 2017 16:27:01 +0900 Subject: [PATCH 3/8] Add more flashiness during kiai time --- osu.Game/Screens/Menu/OsuLogo.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/osu.Game/Screens/Menu/OsuLogo.cs b/osu.Game/Screens/Menu/OsuLogo.cs index 738204e30e..74fc7a3f87 100644 --- a/osu.Game/Screens/Menu/OsuLogo.cs +++ b/osu.Game/Screens/Menu/OsuLogo.cs @@ -228,6 +228,15 @@ namespace osu.Game.Screens.Menu ripple.ScaleTo(ripple.Scale * 1.04f, beatLength, EasingTypes.OutQuint); ripple.FadeOut(beatLength); + + if (kiai && flashLayer.Alpha < 0.4f) + { + flashLayer.ClearTransforms(); + + flashLayer.FadeTo(0.14f, beat_in_time, EasingTypes.Out); + using (flashLayer.BeginDelayedSequence(beat_in_time)) + flashLayer.FadeOut(beatLength); + } } protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) From f57b234cc3694ad0ff9d334624280ccfbdcf6ec5 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 24 May 2017 01:44:47 +0900 Subject: [PATCH 4/8] Expose Beatmap in BeatSyncedContainer --- .../Graphics/Containers/BeatSyncedContainer.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/osu.Game/Graphics/Containers/BeatSyncedContainer.cs b/osu.Game/Graphics/Containers/BeatSyncedContainer.cs index 5624ca07ef..c0defceac0 100644 --- a/osu.Game/Graphics/Containers/BeatSyncedContainer.cs +++ b/osu.Game/Graphics/Containers/BeatSyncedContainer.cs @@ -12,7 +12,7 @@ namespace osu.Game.Graphics.Containers { public class BeatSyncedContainer : Container { - private readonly Bindable beatmap = new Bindable(); + protected readonly Bindable Beatmap = new Bindable(); private int lastBeat; private TimingControlPoint lastTimingPoint; @@ -25,13 +25,13 @@ namespace osu.Game.Graphics.Containers protected override void Update() { - if (beatmap.Value?.Track == null) + if (Beatmap.Value?.Track == null) return; - double currentTrackTime = beatmap.Value.Track.CurrentTime + EarlyActivationMilliseconds; + double currentTrackTime = Beatmap.Value.Track.CurrentTime + EarlyActivationMilliseconds; - TimingControlPoint timingPoint = beatmap.Value.Beatmap.ControlPointInfo.TimingPointAt(currentTrackTime); - EffectControlPoint effectPoint = beatmap.Value.Beatmap.ControlPointInfo.EffectPointAt(currentTrackTime); + TimingControlPoint timingPoint = Beatmap.Value.Beatmap.ControlPointInfo.TimingPointAt(currentTrackTime); + EffectControlPoint effectPoint = Beatmap.Value.Beatmap.ControlPointInfo.EffectPointAt(currentTrackTime); if (timingPoint.BeatLength == 0) return; @@ -48,7 +48,7 @@ namespace osu.Game.Graphics.Containers double offsetFromBeat = (timingPoint.Time - currentTrackTime) % timingPoint.BeatLength; using (BeginDelayedSequence(offsetFromBeat, true)) - OnNewBeat(beatIndex, timingPoint, effectPoint, beatmap.Value.Track.CurrentAmplitudes); + OnNewBeat(beatIndex, timingPoint, effectPoint, Beatmap.Value.Track.CurrentAmplitudes); lastBeat = beatIndex; lastTimingPoint = timingPoint; @@ -57,7 +57,7 @@ namespace osu.Game.Graphics.Containers [BackgroundDependencyLoader] private void load(OsuGameBase game) { - beatmap.BindTo(game.Beatmap); + Beatmap.BindTo(game.Beatmap); } protected virtual void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes) From 7e827c4f11bdf925113bf46fd777deb148798bc1 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 24 May 2017 01:45:01 +0900 Subject: [PATCH 5/8] Add amplitude adjust --- osu.Game/Screens/Menu/OsuLogo.cs | 150 ++++++++++++++++++------------- 1 file changed, 86 insertions(+), 64 deletions(-) diff --git a/osu.Game/Screens/Menu/OsuLogo.cs b/osu.Game/Screens/Menu/OsuLogo.cs index 8826f56180..4259165005 100644 --- a/osu.Game/Screens/Menu/OsuLogo.cs +++ b/osu.Game/Screens/Menu/OsuLogo.cs @@ -31,6 +31,7 @@ namespace osu.Game.Screens.Menu private readonly CircularContainer logoContainer; private readonly Container logoBounceContainer; private readonly Container logoBeatContainer; + private readonly Container logoAmplitudeContainer; private readonly Container logoHoverContainer; private SampleChannel sampleClick; @@ -112,88 +113,95 @@ namespace osu.Game.Screens.Menu } } }, - logoBeatContainer = new Container + logoAmplitudeContainer = new Container { AutoSizeAxes = Axes.Both, Children = new Drawable[] { - new BufferedContainer + logoBeatContainer = new Container { AutoSizeAxes = Axes.Both, Children = new Drawable[] { - logoContainer = new CircularContainer + new BufferedContainer + { + AutoSizeAxes = Axes.Both, + Children = new Drawable[] + { + logoContainer = new CircularContainer + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + RelativeSizeAxes = Axes.Both, + Scale = new Vector2(0.88f), + Masking = true, + Children = new Drawable[] + { + colourAndTriangles = new Container + { + RelativeSizeAxes = Axes.Both, + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + Children = new Drawable[] + { + new Box + { + RelativeSizeAxes = Axes.Both, + Colour = OsuPink, + }, + new Triangles + { + TriangleScale = 4, + ColourLight = OsuColour.FromHex(@"ff7db7"), + ColourDark = OsuColour.FromHex(@"de5b95"), + RelativeSizeAxes = Axes.Both, + }, + } + }, + flashLayer = new Box + { + RelativeSizeAxes = Axes.Both, + BlendingMode = BlendingMode.Additive, + Colour = Color4.White, + Alpha = 0, + }, + }, + }, + logo = new Sprite + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + }, + } + }, + impactContainer = new CircularContainer { Anchor = Anchor.Centre, Origin = Anchor.Centre, + Alpha = 0, + BorderColour = Color4.White, RelativeSizeAxes = Axes.Both, - Scale = new Vector2(0.88f), + BorderThickness = 10, Masking = true, Children = new Drawable[] { - colourAndTriangles = new Container + new Box { RelativeSizeAxes = Axes.Both, - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - Children = new Drawable[] - { - new Box - { - RelativeSizeAxes = Axes.Both, - Colour = OsuPink, - }, - new Triangles - { - TriangleScale = 4, - ColourLight = OsuColour.FromHex(@"ff7db7"), - ColourDark = OsuColour.FromHex(@"de5b95"), - RelativeSizeAxes = Axes.Both, - }, - } - }, - flashLayer = new Box - { - RelativeSizeAxes = Axes.Both, - BlendingMode = BlendingMode.Additive, - Colour = Color4.White, + AlwaysPresent = true, Alpha = 0, - }, - }, + } + } }, - logo = new Sprite + new MenuVisualisation { Anchor = Anchor.Centre, Origin = Anchor.Centre, - }, - } - }, - impactContainer = new CircularContainer - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - Alpha = 0, - BorderColour = Color4.White, - RelativeSizeAxes = Axes.Both, - BorderThickness = 10, - Masking = true, - Children = new Drawable[] - { - new Box - { RelativeSizeAxes = Axes.Both, - AlwaysPresent = true, - Alpha = 0, + BlendingMode = BlendingMode.Additive, + Alpha = 0.2f, } } - }, - new MenuVisualisation - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - RelativeSizeAxes = Axes.Both, - BlendingMode = BlendingMode.Additive, - Alpha = 0.2f, } } } @@ -205,43 +213,57 @@ namespace osu.Game.Screens.Menu } [BackgroundDependencyLoader] - private void load(TextureStore textures, AudioManager audio) + private void load(TextureStore textures, AudioManager audio, OsuGameBase game) { sampleClick = audio.Sample.Get(@"Menu/menuhit"); logo.Texture = textures.Get(@"Menu/logo"); ripple.Texture = textures.Get(@"Menu/logo"); } + private int lastBeatIndex; + protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes) { base.OnNewBeat(beatIndex, timingPoint, effectPoint, amplitudes); + lastBeatIndex = beatIndex; + var beatLength = timingPoint.BeatLength; + float amplitudeAdjust = Math.Min(1, 0.4f + amplitudes.Maximum); + if (beatIndex < 0) return; - logoBeatContainer.ScaleTo(0.98f, beat_in_time, EasingTypes.Out); + logoBeatContainer.ScaleTo(1 - 0.02f * amplitudeAdjust, beat_in_time, EasingTypes.Out); using (logoBeatContainer.BeginDelayedSequence(beat_in_time)) logoBeatContainer.ScaleTo(1, beatLength * 2, EasingTypes.OutQuint); ripple.ClearTransforms(); - ripple.ScaleTo(Vector2.One); - ripple.Alpha = 0.15f; + ripple.ScaleTo(logoAmplitudeContainer.Scale); + ripple.Alpha = 0.15f * amplitudeAdjust; - ripple.ScaleTo(ripple.Scale * 1.04f, beatLength, EasingTypes.OutQuint); - ripple.FadeOut(beatLength); + ripple.ScaleTo(logoAmplitudeContainer.Scale * (1 + 0.04f * amplitudeAdjust), beatLength, EasingTypes.OutQuint); + ripple.FadeOut(beatLength, EasingTypes.OutQuint); if (effectPoint.KiaiMode && flashLayer.Alpha < 0.4f) { flashLayer.ClearTransforms(); - flashLayer.FadeTo(0.14f, beat_in_time, EasingTypes.Out); + flashLayer.FadeTo(0.2f * amplitudeAdjust, beat_in_time, EasingTypes.Out); using (flashLayer.BeginDelayedSequence(beat_in_time)) flashLayer.FadeOut(beatLength); } } + protected override void Update() + { + base.Update(); + + var maxAmplitude = lastBeatIndex >= 0 ? Beatmap.Value.Track.CurrentAmplitudes.Maximum : 0; + logoAmplitudeContainer.ScaleTo(1 - maxAmplitude * 0.04f, 50, EasingTypes.OutQuint); + } + protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) { if (!Interactive) return false; From 84499275ade05987a2b26ebb89b67ebc11c17775 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 24 May 2017 01:58:07 +0900 Subject: [PATCH 6/8] Update framework --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 79b335e9d4..777996fb97 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 79b335e9d4d6f8ff89524f06dbe324db3cf29513 +Subproject commit 777996fb9731ba1895a5ab1323cbbc97259ff741 From 813b09189c8f77fe272a63d32408b269e62b7e8e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 24 May 2017 02:09:31 +0900 Subject: [PATCH 7/8] Remove unused parameter --- osu.Game/Screens/Menu/OsuLogo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/Menu/OsuLogo.cs b/osu.Game/Screens/Menu/OsuLogo.cs index 4259165005..f99e7e80c8 100644 --- a/osu.Game/Screens/Menu/OsuLogo.cs +++ b/osu.Game/Screens/Menu/OsuLogo.cs @@ -213,7 +213,7 @@ namespace osu.Game.Screens.Menu } [BackgroundDependencyLoader] - private void load(TextureStore textures, AudioManager audio, OsuGameBase game) + private void load(TextureStore textures, AudioManager audio) { sampleClick = audio.Sample.Get(@"Menu/menuhit"); logo.Texture = textures.Get(@"Menu/logo"); From b477e5cd9e21dae9d6b6d97641b2777b47017f56 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 24 May 2017 02:53:21 +0900 Subject: [PATCH 8/8] Fix potential nullref --- osu.Game/Screens/Menu/OsuLogo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Menu/OsuLogo.cs b/osu.Game/Screens/Menu/OsuLogo.cs index f99e7e80c8..116f7291e2 100644 --- a/osu.Game/Screens/Menu/OsuLogo.cs +++ b/osu.Game/Screens/Menu/OsuLogo.cs @@ -260,7 +260,7 @@ namespace osu.Game.Screens.Menu { base.Update(); - var maxAmplitude = lastBeatIndex >= 0 ? Beatmap.Value.Track.CurrentAmplitudes.Maximum : 0; + var maxAmplitude = lastBeatIndex >= 0 ? Beatmap.Value?.Track?.CurrentAmplitudes.Maximum ?? 0 : 0; logoAmplitudeContainer.ScaleTo(1 - maxAmplitude * 0.04f, 50, EasingTypes.OutQuint); } @@ -312,4 +312,4 @@ namespace osu.Game.Screens.Menu impactContainer.ScaleTo(1.12f, 250); } } -} \ No newline at end of file +}