diff --git a/osu.Desktop.VisualTests/Tests/TestCaseManiaHitObjects.cs b/osu.Desktop.VisualTests/Tests/TestCaseManiaHitObjects.cs index c4aa5749b3..97c65b799b 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseManiaHitObjects.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseManiaHitObjects.cs @@ -39,15 +39,23 @@ namespace osu.Desktop.VisualTests.Tests Origin = Anchor.Centre, RelativeSizeAxes = Axes.Y, Width = 50, - RelativeCoordinateSpace = new Vector2(1, 10000), Children = new[] { - new DrawableNote(new Note + new Container { - StartTime = 5000 - }) - { - AccentColour = Color4.Red + Name = "Timing section", + RelativeSizeAxes = Axes.Both, + RelativeCoordinateSpace = new Vector2(1, 10000), + Children = new[] + { + new DrawableNote(new Note + { + StartTime = 5000 + }) + { + AccentColour = Color4.Red + } + } } } }, @@ -58,18 +66,25 @@ namespace osu.Desktop.VisualTests.Tests Origin = Anchor.Centre, RelativeSizeAxes = Axes.Y, Width = 50, - RelativeCoordinateSpace = new Vector2(1, 10000), Children = new[] { - new DrawableHoldNote(new HoldNote + new Container { - StartTime = 5000, - Duration = 1000, + Name = "Timing section", + RelativeSizeAxes = Axes.Both, + RelativeCoordinateSpace = new Vector2(1, 10000), + Children = new[] + { + new DrawableHoldNote(new HoldNote + { + StartTime = 5000, + Duration = 1000, - }) - { - AccentColour = Color4.Red, - Length = 0.4f + }) + { + AccentColour = Color4.Red + } + } } } } diff --git a/osu.Game.Rulesets.Mania/Judgements/HitWindows.cs b/osu.Game.Rulesets.Mania/Judgements/HitWindows.cs index a1354314bf..7428f34882 100644 --- a/osu.Game.Rulesets.Mania/Judgements/HitWindows.cs +++ b/osu.Game.Rulesets.Mania/Judgements/HitWindows.cs @@ -93,7 +93,7 @@ namespace osu.Game.Rulesets.Mania.Judgements /// Hit window for a PERFECT hit. /// public double Perfect = perfect_mid; - + /// /// Hit window for a GREAT hit. /// diff --git a/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableHoldNote.cs b/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableHoldNote.cs index 460c65dbbd..b6943a95ce 100644 --- a/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableHoldNote.cs +++ b/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableHoldNote.cs @@ -13,11 +13,6 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables { public class DrawableHoldNote : DrawableManiaHitObject { - /// - /// Length of this hold note, relative to its parent. - /// - public float Length; - private NotePiece headPiece; private BodyPiece bodyPiece; private NotePiece tailPiece; @@ -30,6 +25,9 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables Add(new Drawable[] { + // For now the body piece covers the entire height of the container + // whereas possibly in the future we don't want to extend under the head/tail. + // This will be fixed when new designs are given or the current design is finalized. bodyPiece = new BodyPiece { Anchor = Anchor.BottomCentre, diff --git a/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableManiaHitObject.cs b/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableManiaHitObject.cs index 28f9fa79b2..f33a6fe699 100644 --- a/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableManiaHitObject.cs +++ b/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableManiaHitObject.cs @@ -34,14 +34,14 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables RelativeSizeAxes = Axes.Both, Masking = true, Children = new[] + { + new Box { - new Box - { - RelativeSizeAxes = Axes.Both, - Alpha = 0, - AlwaysPresent = true - } + RelativeSizeAxes = Axes.Both, + Alpha = 0, + AlwaysPresent = true } + } }); } diff --git a/osu.Game.Rulesets.Mania/Objects/Drawables/Pieces/BodyPiece.cs b/osu.Game.Rulesets.Mania/Objects/Drawables/Pieces/BodyPiece.cs index 7a61fd3a00..ac2b7df06f 100644 --- a/osu.Game.Rulesets.Mania/Objects/Drawables/Pieces/BodyPiece.cs +++ b/osu.Game.Rulesets.Mania/Objects/Drawables/Pieces/BodyPiece.cs @@ -1,16 +1,18 @@ -using System; -using OpenTK.Graphics; -using osu.Framework.Graphics; -// Copyright (c) 2007-2017 ppy Pty Ltd . +// Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - +using System; +using OpenTK.Graphics; +using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using osu.Game.Graphics; namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces { + /// + /// Represents length-wise portion of a hold note. + /// internal class BodyPiece : Container, IHasAccentColour { private Box box; diff --git a/osu.Game.Rulesets.Mania/Objects/Drawables/Pieces/NotePiece.cs b/osu.Game.Rulesets.Mania/Objects/Drawables/Pieces/NotePiece.cs index 0acb250f88..2584682833 100644 --- a/osu.Game.Rulesets.Mania/Objects/Drawables/Pieces/NotePiece.cs +++ b/osu.Game.Rulesets.Mania/Objects/Drawables/Pieces/NotePiece.cs @@ -10,6 +10,9 @@ using osu.Game.Graphics; namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces { + /// + /// Represents the static hit markers of notes. + /// internal class NotePiece : Container, IHasAccentColour { private const float head_height = 10; diff --git a/osu.Game.Rulesets.Mania/Objects/HoldNote.cs b/osu.Game.Rulesets.Mania/Objects/HoldNote.cs index e32eb3f147..a25b8fbf2a 100644 --- a/osu.Game.Rulesets.Mania/Objects/HoldNote.cs +++ b/osu.Game.Rulesets.Mania/Objects/HoldNote.cs @@ -8,17 +8,24 @@ using osu.Game.Rulesets.Objects.Types; namespace osu.Game.Rulesets.Mania.Objects { + /// + /// Represents a hit object which requires pressing, holding, and releasing a key. + /// public class HoldNote : Note, IHasEndTime { /// - /// Lenience of release hit windows. + /// Lenience of release hit windows. This is to make cases where the hold note release + /// is timed alongside presses of other hit objects less awkward. /// private const double release_window_lenience = 1.5; public double Duration { get; set; } public double EndTime => StartTime + Duration; - public HitWindows ReleaseHitWindows { get; protected set; } = new HitWindows(); + /// + /// The key-release hit windows for this hold note. + /// + protected HitWindows ReleaseHitWindows = new HitWindows(); public override void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty) { diff --git a/osu.Game.Rulesets.Mania/Objects/Note.cs b/osu.Game.Rulesets.Mania/Objects/Note.cs index 83299ba7be..1d2e4169b5 100644 --- a/osu.Game.Rulesets.Mania/Objects/Note.cs +++ b/osu.Game.Rulesets.Mania/Objects/Note.cs @@ -7,9 +7,15 @@ using osu.Game.Rulesets.Mania.Judgements; namespace osu.Game.Rulesets.Mania.Objects { + /// + /// Represents a hit object which has a single hit press. + /// public class Note : ManiaHitObject { - public HitWindows HitWindows { get; protected set; } = new HitWindows(); + /// + /// The key-press hit window for this note. + /// + protected HitWindows HitWindows = new HitWindows(); public override void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty) { diff --git a/osu.Game.Rulesets.Mania/Objects/Types/IHasColumn.cs b/osu.Game.Rulesets.Mania/Objects/Types/IHasColumn.cs index 7b98b2b4bb..8281d0d9e4 100644 --- a/osu.Game.Rulesets.Mania/Objects/Types/IHasColumn.cs +++ b/osu.Game.Rulesets.Mania/Objects/Types/IHasColumn.cs @@ -1,11 +1,16 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - namespace osu.Game.Rulesets.Mania.Objects.Types { + /// + /// A type of hit object which lies in one of a number of predetermined columns. + /// public interface IHasColumn { + /// + /// The column which the hit object lies in. + /// int Column { get; } } }