From e0ca44c908754b2766ac5dccce2d4d93ae2dacb0 Mon Sep 17 00:00:00 2001 From: Justus Franklin Tumacder Date: Sun, 25 Apr 2021 07:34:17 +0800 Subject: [PATCH] Move SnapFinder from mania ruleset to osu.Game --- .../Objects/Drawables/DrawableNote.cs | 2 +- osu.Game.Rulesets.Mania/UI/DrawableManiaRuleset.cs | 2 -- .../Utils => osu.Game/Rulesets/Objects}/SnapFinder.cs | 9 ++++----- 3 files changed, 5 insertions(+), 8 deletions(-) rename {osu.Game.Rulesets.Mania/Utils => osu.Game/Rulesets/Objects}/SnapFinder.cs (85%) diff --git a/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableNote.cs b/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableNote.cs index 04c4b06c88..2a363606ab 100644 --- a/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableNote.cs +++ b/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableNote.cs @@ -8,7 +8,7 @@ using osu.Framework.Graphics; using osu.Framework.Input.Bindings; using osu.Game.Graphics; using osu.Game.Rulesets.Mania.Skinning.Default; -using osu.Game.Rulesets.Mania.Utils; +using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.UI.Scrolling; using osu.Game.Screens.Edit; diff --git a/osu.Game.Rulesets.Mania/UI/DrawableManiaRuleset.cs b/osu.Game.Rulesets.Mania/UI/DrawableManiaRuleset.cs index 17535c9bc9..c1b61aaf31 100644 --- a/osu.Game.Rulesets.Mania/UI/DrawableManiaRuleset.cs +++ b/osu.Game.Rulesets.Mania/UI/DrawableManiaRuleset.cs @@ -20,7 +20,6 @@ using osu.Game.Rulesets.Mania.Configuration; using osu.Game.Rulesets.Mania.Objects; using osu.Game.Rulesets.Mania.Objects.Drawables; using osu.Game.Rulesets.Mania.Replays; -using osu.Game.Rulesets.Mania.Utils; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Objects.Drawables; @@ -84,7 +83,6 @@ namespace osu.Game.Rulesets.Mania.UI : base(ruleset, beatmap, mods) { BarLines = new BarLineGenerator(Beatmap).BarLines; - snapFinder = new SnapFinder(Beatmap); } diff --git a/osu.Game.Rulesets.Mania/Utils/SnapFinder.cs b/osu.Game/Rulesets/Objects/SnapFinder.cs similarity index 85% rename from osu.Game.Rulesets.Mania/Utils/SnapFinder.cs rename to osu.Game/Rulesets/Objects/SnapFinder.cs index ed3bd4af05..eb8f4110a2 100644 --- a/osu.Game.Rulesets.Mania/Utils/SnapFinder.cs +++ b/osu.Game/Rulesets/Objects/SnapFinder.cs @@ -3,17 +3,16 @@ using System; using osu.Framework.Utils; +using osu.Game.Beatmaps; using osu.Game.Beatmaps.ControlPoints; -using osu.Game.Rulesets.Mania.Beatmaps; -using osu.Game.Rulesets.Objects; -namespace osu.Game.Rulesets.Mania.Utils +namespace osu.Game.Rulesets.Objects { public class SnapFinder { - private readonly ManiaBeatmap beatmap; + private readonly IBeatmap beatmap; - public SnapFinder(ManiaBeatmap beatmap) + public SnapFinder(IBeatmap beatmap) { this.beatmap = beatmap; }