mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 18:23:04 +08:00
Cleanups.
This commit is contained in:
parent
d852567d1d
commit
5b323ad483
@ -39,6 +39,12 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
Width = 50,
|
Width = 50,
|
||||||
|
Children = new[]
|
||||||
|
{
|
||||||
|
new Container
|
||||||
|
{
|
||||||
|
Name = "Timing section",
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
RelativeCoordinateSpace = new Vector2(1, 10000),
|
RelativeCoordinateSpace = new Vector2(1, 10000),
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
@ -50,6 +56,8 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
AccentColour = Color4.Red
|
AccentColour = Color4.Red
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
@ -58,6 +66,12 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
Width = 50,
|
Width = 50,
|
||||||
|
Children = new[]
|
||||||
|
{
|
||||||
|
new Container
|
||||||
|
{
|
||||||
|
Name = "Timing section",
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
RelativeCoordinateSpace = new Vector2(1, 10000),
|
RelativeCoordinateSpace = new Vector2(1, 10000),
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
@ -68,8 +82,9 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
|
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
AccentColour = Color4.Red,
|
AccentColour = Color4.Red
|
||||||
Length = 0.4f
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,11 +13,6 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
|||||||
{
|
{
|
||||||
public class DrawableHoldNote : DrawableManiaHitObject<HoldNote>
|
public class DrawableHoldNote : DrawableManiaHitObject<HoldNote>
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Length of this hold note, relative to its parent.
|
|
||||||
/// </summary>
|
|
||||||
public float Length;
|
|
||||||
|
|
||||||
private NotePiece headPiece;
|
private NotePiece headPiece;
|
||||||
private BodyPiece bodyPiece;
|
private BodyPiece bodyPiece;
|
||||||
private NotePiece tailPiece;
|
private NotePiece tailPiece;
|
||||||
@ -30,6 +25,9 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
|||||||
|
|
||||||
Add(new Drawable[]
|
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
|
bodyPiece = new BodyPiece
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomCentre,
|
Anchor = Anchor.BottomCentre,
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
using System;
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
using OpenTK.Graphics;
|
|
||||||
using osu.Framework.Graphics;
|
|
||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// 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.Containers;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
|
namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents length-wise portion of a hold note.
|
||||||
|
/// </summary>
|
||||||
internal class BodyPiece : Container, IHasAccentColour
|
internal class BodyPiece : Container, IHasAccentColour
|
||||||
{
|
{
|
||||||
private Box box;
|
private Box box;
|
||||||
|
@ -10,6 +10,9 @@ using osu.Game.Graphics;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
|
namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the static hit markers of notes.
|
||||||
|
/// </summary>
|
||||||
internal class NotePiece : Container, IHasAccentColour
|
internal class NotePiece : Container, IHasAccentColour
|
||||||
{
|
{
|
||||||
private const float head_height = 10;
|
private const float head_height = 10;
|
||||||
|
@ -8,17 +8,24 @@ using osu.Game.Rulesets.Objects.Types;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Mania.Objects
|
namespace osu.Game.Rulesets.Mania.Objects
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a hit object which requires pressing, holding, and releasing a key.
|
||||||
|
/// </summary>
|
||||||
public class HoldNote : Note, IHasEndTime
|
public class HoldNote : Note, IHasEndTime
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 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.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private const double release_window_lenience = 1.5;
|
private const double release_window_lenience = 1.5;
|
||||||
|
|
||||||
public double Duration { get; set; }
|
public double Duration { get; set; }
|
||||||
public double EndTime => StartTime + Duration;
|
public double EndTime => StartTime + Duration;
|
||||||
|
|
||||||
public HitWindows ReleaseHitWindows { get; protected set; } = new HitWindows();
|
/// <summary>
|
||||||
|
/// The key-release hit windows for this hold note.
|
||||||
|
/// </summary>
|
||||||
|
protected HitWindows ReleaseHitWindows = new HitWindows();
|
||||||
|
|
||||||
public override void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty)
|
public override void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty)
|
||||||
{
|
{
|
||||||
|
@ -7,9 +7,15 @@ using osu.Game.Rulesets.Mania.Judgements;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Mania.Objects
|
namespace osu.Game.Rulesets.Mania.Objects
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a hit object which has a single hit press.
|
||||||
|
/// </summary>
|
||||||
public class Note : ManiaHitObject
|
public class Note : ManiaHitObject
|
||||||
{
|
{
|
||||||
public HitWindows HitWindows { get; protected set; } = new HitWindows();
|
/// <summary>
|
||||||
|
/// The key-press hit window for this note.
|
||||||
|
/// </summary>
|
||||||
|
protected HitWindows HitWindows = new HitWindows();
|
||||||
|
|
||||||
public override void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty)
|
public override void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty)
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mania.Objects.Types
|
namespace osu.Game.Rulesets.Mania.Objects.Types
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A type of hit object which lies in one of a number of predetermined columns.
|
||||||
|
/// </summary>
|
||||||
public interface IHasColumn
|
public interface IHasColumn
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The column which the hit object lies in.
|
||||||
|
/// </summary>
|
||||||
int Column { get; }
|
int Column { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user