From bf66b84ff8c2463caa28e8147fdfce982757589c Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Wed, 15 Mar 2017 16:07:40 +0900 Subject: [PATCH] Move a few classes/enums into separate files. --- .../Objects/Drawables/DrawableOsuHitObject.cs | 1 + .../Objects/Drawables/DrawableSliderTick.cs | 1 + osu.Game.Modes.Osu/OsuScoreProcessor.cs | 1 + osu.Game.Modes.Osu/UI/OsuPlayfield.cs | 1 + osu.Game/Modes/Judgements/JudgementInfo.cs | 11 ++++++++ .../Modes/Objects/Drawables/ArmedState.cs | 9 ++++++ .../Objects/Drawables/DrawableHitObject.cs | 28 +------------------ osu.Game/Modes/Objects/Drawables/HitResult.cs | 12 ++++++++ osu.Game/Modes/ScoreProcesssor.cs | 1 + osu.Game/Modes/UI/HitRenderer.cs | 1 + osu.Game/osu.Game.csproj | 3 ++ 11 files changed, 42 insertions(+), 27 deletions(-) create mode 100644 osu.Game/Modes/Judgements/JudgementInfo.cs create mode 100644 osu.Game/Modes/Objects/Drawables/ArmedState.cs create mode 100644 osu.Game/Modes/Objects/Drawables/HitResult.cs diff --git a/osu.Game.Modes.Osu/Objects/Drawables/DrawableOsuHitObject.cs b/osu.Game.Modes.Osu/Objects/Drawables/DrawableOsuHitObject.cs index 4b436dd82f..be237a22f4 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/DrawableOsuHitObject.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/DrawableOsuHitObject.cs @@ -2,6 +2,7 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.ComponentModel; +using osu.Game.Modes.Judgements; using osu.Game.Modes.Objects.Drawables; namespace osu.Game.Modes.Osu.Objects.Drawables diff --git a/osu.Game.Modes.Osu/Objects/Drawables/DrawableSliderTick.cs b/osu.Game.Modes.Osu/Objects/Drawables/DrawableSliderTick.cs index 7c5fa4a092..acda9da62f 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/DrawableSliderTick.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/DrawableSliderTick.cs @@ -9,6 +9,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Transforms; using osu.Game.Beatmaps.Samples; +using osu.Game.Modes.Judgements; using osu.Game.Modes.Objects.Drawables; using OpenTK; using OpenTK.Graphics; diff --git a/osu.Game.Modes.Osu/OsuScoreProcessor.cs b/osu.Game.Modes.Osu/OsuScoreProcessor.cs index 7bc82c3c8b..2377e2f520 100644 --- a/osu.Game.Modes.Osu/OsuScoreProcessor.cs +++ b/osu.Game.Modes.Osu/OsuScoreProcessor.cs @@ -1,6 +1,7 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Game.Modes.Judgements; using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.Osu.Objects.Drawables; diff --git a/osu.Game.Modes.Osu/UI/OsuPlayfield.cs b/osu.Game.Modes.Osu/UI/OsuPlayfield.cs index 849d7e74d6..ab19a92212 100644 --- a/osu.Game.Modes.Osu/UI/OsuPlayfield.cs +++ b/osu.Game.Modes.Osu/UI/OsuPlayfield.cs @@ -11,6 +11,7 @@ using osu.Game.Modes.Osu.Objects.Drawables.Connections; using osu.Game.Modes.UI; using System.Linq; using osu.Game.Graphics.Cursor; +using osu.Game.Modes.Judgements; using OpenTK.Graphics; namespace osu.Game.Modes.Osu.UI diff --git a/osu.Game/Modes/Judgements/JudgementInfo.cs b/osu.Game/Modes/Judgements/JudgementInfo.cs new file mode 100644 index 0000000000..cb6710dd32 --- /dev/null +++ b/osu.Game/Modes/Judgements/JudgementInfo.cs @@ -0,0 +1,11 @@ +using osu.Game.Modes.Objects.Drawables; + +namespace osu.Game.Modes.Judgements +{ + public class JudgementInfo + { + public ulong? ComboAtHit; + public HitResult? Result; + public double TimeOffset; + } +} \ No newline at end of file diff --git a/osu.Game/Modes/Objects/Drawables/ArmedState.cs b/osu.Game/Modes/Objects/Drawables/ArmedState.cs new file mode 100644 index 0000000000..dcbe7cc425 --- /dev/null +++ b/osu.Game/Modes/Objects/Drawables/ArmedState.cs @@ -0,0 +1,9 @@ +namespace osu.Game.Modes.Objects.Drawables +{ + public enum ArmedState + { + Idle, + Hit, + Miss + } +} \ No newline at end of file diff --git a/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs b/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs index 33ff8a0810..a6b787f0de 100644 --- a/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs +++ b/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs @@ -3,12 +3,12 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using osu.Framework; using osu.Framework.Allocation; using osu.Framework.Audio; using osu.Framework.Audio.Sample; using osu.Game.Beatmaps.Samples; +using osu.Game.Modes.Judgements; using OpenTK; using Container = osu.Framework.Graphics.Containers.Container; @@ -16,10 +16,6 @@ namespace osu.Game.Modes.Objects.Drawables { public abstract class DrawableHitObject : Container, IStateful { - public override bool HandleInput => Interactive; - - public bool Interactive = true; - public JudgementInfo Judgement; protected abstract JudgementInfo CreateJudgementInfo(); @@ -152,30 +148,8 @@ namespace osu.Game.Modes.Objects.Drawables } } - public enum ArmedState - { - Idle, - Hit, - Miss - } - public class PositionalJudgementInfo : JudgementInfo { public Vector2 PositionOffset; } - - public class JudgementInfo - { - public ulong? ComboAtHit; - public HitResult? Result; - public double TimeOffset; - } - - public enum HitResult - { - [Description(@"Miss")] - Miss, - [Description(@"Hit")] - Hit, - } } diff --git a/osu.Game/Modes/Objects/Drawables/HitResult.cs b/osu.Game/Modes/Objects/Drawables/HitResult.cs new file mode 100644 index 0000000000..2a66f14bdc --- /dev/null +++ b/osu.Game/Modes/Objects/Drawables/HitResult.cs @@ -0,0 +1,12 @@ +using System.ComponentModel; + +namespace osu.Game.Modes.Objects.Drawables +{ + public enum HitResult + { + [Description(@"Miss")] + Miss, + [Description(@"Hit")] + Hit, + } +} \ No newline at end of file diff --git a/osu.Game/Modes/ScoreProcesssor.cs b/osu.Game/Modes/ScoreProcesssor.cs index 554996c145..0fb9ddba0c 100644 --- a/osu.Game/Modes/ScoreProcesssor.cs +++ b/osu.Game/Modes/ScoreProcesssor.cs @@ -5,6 +5,7 @@ using osu.Framework.Configuration; using osu.Game.Modes.Objects.Drawables; using System; using System.Collections.Generic; +using osu.Game.Modes.Judgements; namespace osu.Game.Modes { diff --git a/osu.Game/Modes/UI/HitRenderer.cs b/osu.Game/Modes/UI/HitRenderer.cs index a40b332095..6b2bd55a7d 100644 --- a/osu.Game/Modes/UI/HitRenderer.cs +++ b/osu.Game/Modes/UI/HitRenderer.cs @@ -12,6 +12,7 @@ using osu.Game.Screens.Play; using System; using System.Collections.Generic; using System.Linq; +using osu.Game.Modes.Judgements; namespace osu.Game.Modes.UI { diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index b377ba6096..d2cf09bde4 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -93,7 +93,10 @@ + + +