1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

A few xmldoc additions/fixes.

This commit is contained in:
smoogipooo 2017-04-18 09:13:36 +09:00
parent 786446354e
commit c61e3265bb
21 changed files with 75 additions and 24 deletions

View File

@ -30,9 +30,9 @@ namespace osu.Game.Beatmaps
public static class BeatmapConverterExtensions
{
/// <summary>
/// Checks if a Beatmap can be converted using a Beatmap Converter.
/// Checks if a Beatmap can be converted using this Beatmap Converter.
/// </summary>
/// <param name="converter">The Converter to use.</param>
/// <param name="converter">The Beatmap Converter.</param>
/// <param name="beatmap">The Beatmap to check.</param>
/// <returns>Whether the Beatmap can be converted using <paramref name="converter"/>.</returns>
public static bool CanConvert<TObject>(this IBeatmapConverter<TObject> converter, Beatmap beatmap) where TObject : HitObject

View File

@ -6,7 +6,7 @@ using osu.Game.Modes.Objects.Types;
namespace osu.Game.Modes.Objects.Legacy.Catch
{
/// <summary>
/// Legacy Hit-type, used for parsing Beatmaps.
/// Legacy osu!catch Hit-type, used for parsing Beatmaps.
/// </summary>
internal sealed class Hit : HitObject, IHasCombo, IHasXPosition
{

View File

@ -1,12 +1,15 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using OpenTK;
using osu.Game.Modes.Objects.Types;
using System.Collections.Generic;
namespace osu.Game.Modes.Objects.Legacy.Catch
{
/// <summary>
/// A HitObjectParser to parse legacy osu!catch Beatmaps.
/// </summary>
internal class HitObjectParser : Legacy.HitObjectParser
{
protected override HitObject CreateHit(Vector2 position, bool newCombo)

View File

@ -6,7 +6,7 @@ using osu.Game.Modes.Objects.Types;
namespace osu.Game.Modes.Objects.Legacy.Catch
{
/// <summary>
/// Legacy Slider-type, used for parsing Beatmaps.
/// Legacy osu!catch Slider-type, used for parsing Beatmaps.
/// </summary>
internal sealed class Slider : CurvedHitObject, IHasXPosition, IHasCombo
{

View File

@ -6,9 +6,9 @@ using osu.Game.Modes.Objects.Types;
namespace osu.Game.Modes.Objects.Legacy.Catch
{
/// <summary>
/// Legacy Spinner-type, used for parsing Beatmaps.
/// Legacy osu!catch Spinner-type, used for parsing Beatmaps.
/// </summary>
internal class Spinner : HitObject, IHasEndTime
internal sealed class Spinner : HitObject, IHasEndTime
{
public double EndTime { get; set; }

View File

@ -11,6 +11,9 @@ using osu.Game.Audio;
namespace osu.Game.Modes.Objects.Legacy
{
/// <summary>
/// A HitObjectParser to parse legacy Beatmaps.
/// </summary>
internal abstract class HitObjectParser : Objects.HitObjectParser
{
public override HitObject Parse(string text)
@ -146,10 +149,6 @@ namespace osu.Game.Modes.Objects.Legacy
return result;
}
protected abstract HitObject CreateHit(Vector2 position, bool newCombo);
protected abstract HitObject CreateSlider(Vector2 position, bool newCombo, List<Vector2> controlPoints, double length, CurveType curveType, int repeatCount);
protected abstract HitObject CreateSpinner(Vector2 position, double endTime);
private void readCustomSampleBanks(string str, ref string normalSampleBank, ref string addSampleBank, ref int sampleVolume)
{
if (string.IsNullOrEmpty(str))
@ -175,6 +174,34 @@ namespace osu.Game.Modes.Objects.Legacy
sampleVolume = split.Length > 3 ? int.Parse(split[3]) : 0;
}
/// <summary>
/// Creates a legacy Hit-type hit object.
/// </summary>
/// <param name="position">The position of the hit object.</param>
/// <param name="newCombo">Whether the hit object creates a new combo.</param>
/// <returns>The hit object.</returns>
protected abstract HitObject CreateHit(Vector2 position, bool newCombo);
/// <summary>
/// Creats a legacy Slider-type hit object.
/// </summary>
/// <param name="position">The position of the hit object.</param>
/// <param name="newCombo">Whether the hit object creates a new combo.</param>
/// <param name="controlPoints">The slider control points.</param>
/// <param name="length">The slider length.</param>
/// <param name="curveType">The slider curve type.</param>
/// <param name="repeatCount">The slider repeat count.</param>
/// <returns>The hit object.</returns>
protected abstract HitObject CreateSlider(Vector2 position, bool newCombo, List<Vector2> controlPoints, double length, CurveType curveType, int repeatCount);
/// <summary>
/// Creates a legacy Spinner-type hit object.
/// </summary>
/// <param name="position">The position of the hit object.</param>
/// <param name="endTime">The spinner end time.</param>
/// <returns>The hit object.</returns>
protected abstract HitObject CreateSpinner(Vector2 position, double endTime);
[Flags]
private enum LegacySoundType
{

View File

@ -6,7 +6,7 @@ using osu.Game.Modes.Objects.Types;
namespace osu.Game.Modes.Objects.Legacy.Mania
{
/// <summary>
/// Legacy Hit-type, used for parsing Beatmaps.
/// Legacy osu!mania Hit-type, used for parsing Beatmaps.
/// </summary>
internal sealed class Hit : HitObject, IHasColumn, IHasCombo
{

View File

@ -1,12 +1,15 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using OpenTK;
using osu.Game.Modes.Objects.Types;
using System.Collections.Generic;
namespace osu.Game.Modes.Objects.Legacy.Mania
{
/// <summary>
/// A HitObjectParser to parse legacy osu!mania Beatmaps.
/// </summary>
internal class HitObjectParser : Legacy.HitObjectParser
{
protected override HitObject CreateHit(Vector2 position, bool newCombo)

View File

@ -6,7 +6,7 @@ using osu.Game.Modes.Objects.Types;
namespace osu.Game.Modes.Objects.Legacy.Mania
{
/// <summary>
/// Legacy Slider-type, used for parsing Beatmaps.
/// Legacy osu!mania Slider-type, used for parsing Beatmaps.
/// </summary>
internal sealed class Slider : CurvedHitObject, IHasColumn, IHasCombo
{

View File

@ -6,9 +6,9 @@ using osu.Game.Modes.Objects.Types;
namespace osu.Game.Modes.Objects.Legacy.Mania
{
/// <summary>
/// Legacy Spinner-type, used for parsing Beatmaps.
/// Legacy osu!mania Spinner-type, used for parsing Beatmaps.
/// </summary>
internal class Spinner : HitObject, IHasEndTime, IHasColumn
internal sealed class Spinner : HitObject, IHasEndTime, IHasColumn
{
public double EndTime { get; set; }

View File

@ -7,7 +7,7 @@ using OpenTK;
namespace osu.Game.Modes.Objects.Legacy.Osu
{
/// <summary>
/// Legacy Hit-type, used for parsing Beatmaps.
/// Legacy osu! Hit-type, used for parsing Beatmaps.
/// </summary>
internal sealed class Hit : HitObject, IHasPosition, IHasCombo
{

View File

@ -7,6 +7,9 @@ using System.Collections.Generic;
namespace osu.Game.Modes.Objects.Legacy.Osu
{
/// <summary>
/// A HitObjectParser to parse legacy osu! Beatmaps.
/// </summary>
internal class HitObjectParser : Legacy.HitObjectParser
{
protected override HitObject CreateHit(Vector2 position, bool newCombo)

View File

@ -7,7 +7,7 @@ using OpenTK;
namespace osu.Game.Modes.Objects.Legacy.Osu
{
/// <summary>
/// Legacy Slider-type, used for parsing Beatmaps.
/// Legacy osu! Slider-type, used for parsing Beatmaps.
/// </summary>
internal sealed class Slider : CurvedHitObject, IHasPosition, IHasCombo
{

View File

@ -7,9 +7,9 @@ using OpenTK;
namespace osu.Game.Modes.Objects.Legacy.Osu
{
/// <summary>
/// Legacy Spinner-type, used for parsing Beatmaps.
/// Legacy osu! Spinner-type, used for parsing Beatmaps.
/// </summary>
internal class Spinner : HitObject, IHasEndTime, IHasPosition
internal sealed class Spinner : HitObject, IHasEndTime, IHasPosition
{
public double EndTime { get; set; }

View File

@ -6,7 +6,7 @@ using osu.Game.Modes.Objects.Types;
namespace osu.Game.Modes.Objects.Legacy.Taiko
{
/// <summary>
/// Legacy Hit-type, used for parsing Beatmaps.
/// Legacy osu!taiko Hit-type, used for parsing Beatmaps.
/// </summary>
internal sealed class Hit : HitObject, IHasCombo
{

View File

@ -7,6 +7,9 @@ using System.Collections.Generic;
namespace osu.Game.Modes.Objects.Legacy.Taiko
{
/// <summary>
/// A HitObjectParser to parse legacy osu!taiko Beatmaps.
/// </summary>
internal class HitObjectParser : Legacy.HitObjectParser
{
protected override HitObject CreateHit(Vector2 position, bool newCombo)

View File

@ -6,7 +6,7 @@ using osu.Game.Modes.Objects.Types;
namespace osu.Game.Modes.Objects.Legacy.Taiko
{
/// <summary>
/// Legacy Slider-type, used for parsing Beatmaps.
/// Legacy osu!taiko Slider-type, used for parsing Beatmaps.
/// </summary>
internal sealed class Slider : CurvedHitObject, IHasCombo
{

View File

@ -6,9 +6,9 @@ using osu.Game.Modes.Objects.Types;
namespace osu.Game.Modes.Objects.Legacy.Taiko
{
/// <summary>
/// Legacy Spinner-type, used for parsing Beatmaps.
/// Legacy osu!taiko Spinner-type, used for parsing Beatmaps.
/// </summary>
internal class Spinner : HitObject, IHasEndTime
internal sealed class Spinner : HitObject, IHasEndTime
{
public double EndTime { get; set; }

View File

@ -3,8 +3,14 @@
namespace osu.Game.Modes.Objects.Types
{
/// <summary>
/// A HitObject that lies in a column space.
/// </summary>
public interface IHasColumn
{
/// <summary>
/// The column which this HitObject lies in.
/// </summary>
int Column { get; }
}
}

View File

@ -9,6 +9,9 @@ namespace osu.Game.Modes.Objects.Types
/// </summary>
public interface IHasXPosition
{
/// <summary>
/// The starting X-position of this HitObject.
/// </summary>
float X { get; }
}
}

View File

@ -9,6 +9,9 @@ namespace osu.Game.Modes.Objects.Types
/// </summary>
public interface IHasYPosition
{
/// <summary>
/// The starting Y-position of this HitObject.
/// </summary>
float Y { get; }
}
}