1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 03:42:58 +08:00

More explicative xmldoc.

This commit is contained in:
smoogipooo 2017-03-24 19:05:45 +09:00
parent 369e3903ac
commit 405c6f9691
2 changed files with 8 additions and 8 deletions

View File

@ -5,6 +5,9 @@ using OpenTK;
namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces
{ {
/// <summary>
/// A type of circle piece which is drawn at a higher scale as an "accent".
/// </summary>
public class AccentedCirclePiece : CirclePiece public class AccentedCirclePiece : CirclePiece
{ {
/// <summary> /// <summary>

View File

@ -7,7 +7,6 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Backgrounds;
using OpenTK.Graphics; using OpenTK.Graphics;
using OpenTK;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using System; using System;
@ -17,11 +16,8 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces
/// <summary> /// <summary>
/// A circle piece which is used uniformly through osu!taiko to visualise hitobjects. /// A circle piece which is used uniformly through osu!taiko to visualise hitobjects.
/// <para> /// <para>
/// The body of this piece will overshoot it by Height/2 on both sides of its length, such that /// The body of this piece will overshoot it by <see cref="CirclePiece.Height"/> to form
/// a regular "circle" is the result of setting Width to 0. /// a rounded (_[-Width-]_) figure such that a regular "circle" is the result of setting Width to 0.
/// </para>
/// <para>
/// Hitobjects that have a length (e.g. DrumRolls) need only to set Width and the extra corner radius will be added internally.
/// </para> /// </para>
/// </summary> /// </summary>
public class CirclePiece : Container public class CirclePiece : Container
@ -67,7 +63,6 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces
set { throw new InvalidOperationException($"{nameof(CirclePiece)} must always use CentreLeft origin."); } set { throw new InvalidOperationException($"{nameof(CirclePiece)} must always use CentreLeft origin."); }
} }
private readonly Container innerLayer; private readonly Container innerLayer;
private readonly Container innerCircleContainer; private readonly Container innerCircleContainer;
private readonly Box innerBackground; private readonly Box innerBackground;
@ -80,8 +75,9 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces
{ {
this.symbolName = symbolName; this.symbolName = symbolName;
// The "inner layer" overshoots the the CirclePiece by Height/2 px on both sides
Height = TaikoHitObject.CIRCLE_RADIUS * 2; Height = TaikoHitObject.CIRCLE_RADIUS * 2;
// The "inner layer" is the body of the CirclePiece that overshoots it by Height/2 px on both sides
AddInternal(innerLayer = new Container AddInternal(innerLayer = new Container
{ {
Name = "Inner Layer", Name = "Inner Layer",
@ -154,6 +150,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces
protected override void Update() protected override void Update()
{ {
// Add the overshoot to compensate for corner radius
innerLayer.Width = DrawWidth + DrawHeight; innerLayer.Width = DrawWidth + DrawHeight;
} }