diff --git a/osu.Game.Rulesets.Karaoke/Mods/KaraokeModFlashlight.cs b/osu.Game.Rulesets.Karaoke/Mods/KaraokeModFlashlight.cs index 7e44213c7..1768e032f 100644 --- a/osu.Game.Rulesets.Karaoke/Mods/KaraokeModFlashlight.cs +++ b/osu.Game.Rulesets.Karaoke/Mods/KaraokeModFlashlight.cs @@ -45,11 +45,13 @@ public override void ApplyToDrawableRuleset(DrawableRuleset dr { base.ApplyToDrawableRuleset(drawableRuleset); - var notePlayfield = (drawableRuleset as DrawableKaraokeRuleset)?.Playfield?.NotePlayfield; + var drawableKaraokeRuleset = drawableRuleset as DrawableKaraokeRuleset; + + var notePlayfield = drawableKaraokeRuleset?.Playfield?.NotePlayfield; if (notePlayfield == null) return; - var flashlight = drawableRuleset.KeyBindingInputManager.Children.OfType().FirstOrDefault(); + var flashlight = drawableKaraokeRuleset?.KeyBindingInputManager.Children.OfType().FirstOrDefault(); if (flashlight == null) return; diff --git a/osu.Game.Rulesets.Karaoke/UI/DrawableKaraokeRuleset.cs b/osu.Game.Rulesets.Karaoke/UI/DrawableKaraokeRuleset.cs index 57200d321..03784ddb7 100644 --- a/osu.Game.Rulesets.Karaoke/UI/DrawableKaraokeRuleset.cs +++ b/osu.Game.Rulesets.Karaoke/UI/DrawableKaraokeRuleset.cs @@ -32,6 +32,8 @@ public partial class DrawableKaraokeRuleset : DrawableScrollingRuleset (KaraokeRulesetConfigManager)base.Config; + public new KaraokeInputManager KeyBindingInputManager => (KaraokeInputManager)base.KeyBindingInputManager; + private readonly Bindable configDirection = new(); [Cached(typeof(INotePositionInfo))]