1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Add further xmldoc

This commit is contained in:
Salman Ahmed 2021-04-18 06:35:54 +03:00
parent a73bae7a66
commit f6a09be62d
4 changed files with 17 additions and 8 deletions

View File

@ -20,6 +20,14 @@ namespace osu.Game.Screens.Play
private readonly Storyboard storyboard;
private DrawableStoryboard drawableStoryboard;
/// <summary>
/// Whether the storyboard is considered finished.
/// </summary>
/// <remarks>
/// This is true by default in here, until an actual drawable storyboard is loaded, in which case it'll bind to it.
/// </remarks>
public IBindable<bool> HasStoryboardEnded = new BindableBool(true);
public DimmableStoryboard(Storyboard storyboard)
{
this.storyboard = storyboard;
@ -63,7 +71,5 @@ namespace osu.Game.Screens.Play
Add(storyboard);
OverlayLayerContainer.Add(storyboard.OverlayLayer.CreateProxy());
}
public IBindable<bool> HasStoryboardEnded = new BindableBool(true);
}
}

View File

@ -91,7 +91,7 @@ namespace osu.Game.Storyboards.Drawables
}
/// <summary>
/// Whether the storyboard has ended after the gameplay portion of the beatmap.
/// Whether the storyboard is considered finished.
/// </summary>
public IBindable<bool> HasStoryboardEnded => hasStoryboardEnded;

View File

@ -18,13 +18,13 @@ namespace osu.Game.Storyboards
public static class StoryboardElementExtensions
{
/// <summary>
/// Returns the end time of this object.
/// Returns the end time of this storyboard element.
/// </summary>
/// <remarks>
/// This returns the <see cref="IStoryboardElementHasDuration.EndTime"/> where available, falling back to <see cref="IStoryboardElement.StartTime"/> otherwise.
/// </remarks>
/// <param name="storyboardElement">The object.</param>
/// <returns>The end time of this object.</returns>
public static double GetEndTime(this IStoryboardElement storyboardElement) => (storyboardElement as IStoryboardElementHasDuration)?.EndTime ?? storyboardElement.StartTime;
/// <param name="element">The storyboard element.</param>
/// <returns>The end time of this element.</returns>
public static double GetEndTime(this IStoryboardElement element) => (element as IStoryboardElementHasDuration)?.EndTime ?? element.StartTime;
}
}

View File

@ -4,10 +4,13 @@
namespace osu.Game.Storyboards
{
/// <summary>
/// A StoryboardElement that ends at a different time than its start time.
/// A <see cref="IStoryboardElement"/> that ends at a different time than its start time.
/// </summary>
public interface IStoryboardElementHasDuration
{
/// <summary>
/// The time at which the <see cref="IStoryboardElement"/> ends.
/// </summary>
double EndTime { get; }
}
}