From 9a5ac64332c94a9f7278e196f92d5c3f856207de Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 14 Feb 2017 09:40:26 +0900 Subject: [PATCH] Make HitObjectType more accessible. # Conflicts: # osu.Game.Modes.Osu/Objects/OsuHitObjectParser.cs --- osu.Game.Modes.Osu/Objects/OsuHitObject.cs | 26 +++++++++---------- .../Objects/OsuHitObjectParser.cs | 14 +++++----- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/osu.Game.Modes.Osu/Objects/OsuHitObject.cs b/osu.Game.Modes.Osu/Objects/OsuHitObject.cs index 5c3121e76c..c23c9a0b64 100644 --- a/osu.Game.Modes.Osu/Objects/OsuHitObject.cs +++ b/osu.Game.Modes.Osu/Objects/OsuHitObject.cs @@ -31,19 +31,19 @@ public override void SetDefaultsFromBeatmap(Beatmap beatmap) Scale = (1.0f - 0.7f * (beatmap.BeatmapInfo.BaseDifficulty.CircleSize - 5) / 5) / 2; } + } - [Flags] - internal enum HitObjectType - { - Circle = 1, - Slider = 2, - NewCombo = 4, - CircleNewCombo = 5, - SliderNewCombo = 6, - Spinner = 8, - ColourHax = 122, - Hold = 128, - ManiaLong = 128, - } + [Flags] + public enum HitObjectType + { + Circle = 1, + Slider = 2, + NewCombo = 4, + CircleNewCombo = 5, + SliderNewCombo = 6, + Spinner = 8, + ColourHax = 122, + Hold = 128, + ManiaLong = 128, } } diff --git a/osu.Game.Modes.Osu/Objects/OsuHitObjectParser.cs b/osu.Game.Modes.Osu/Objects/OsuHitObjectParser.cs index 0f65ae598a..ce480e1eac 100644 --- a/osu.Game.Modes.Osu/Objects/OsuHitObjectParser.cs +++ b/osu.Game.Modes.Osu/Objects/OsuHitObjectParser.cs @@ -18,17 +18,17 @@ public class OsuHitObjectParser : HitObjectParser public override HitObject Parse(string text) { string[] split = text.Split(','); - var type = (OsuHitObject.HitObjectType)int.Parse(split[3]); - bool combo = type.HasFlag(OsuHitObject.HitObjectType.NewCombo); - type &= (OsuHitObject.HitObjectType)0xF; - type &= ~OsuHitObject.HitObjectType.NewCombo; + var type = (HitObjectType)int.Parse(split[3]); + bool combo = type.HasFlag(HitObjectType.NewCombo); + type &= (HitObjectType)0xF; + type &= ~HitObjectType.NewCombo; OsuHitObject result; switch (type) { - case OsuHitObject.HitObjectType.Circle: + case HitObjectType.Circle: result = new HitCircle(); break; - case OsuHitObject.HitObjectType.Slider: + case HitObjectType.Slider: Slider s = new Slider(); CurveTypes curveType = CurveTypes.Catmull; @@ -92,7 +92,7 @@ public override HitObject Parse(string text) result = s; break; - case OsuHitObject.HitObjectType.Spinner: + case HitObjectType.Spinner: result = new Spinner(); break; default: