mirror of
https://github.com/ppy/osu
synced 2025-01-29 09:13:14 +00:00
Expose the latest end time of storyboard elements
Co-authored-by: Marlina Bowring <marlina@umich.edu>
This commit is contained in:
parent
4853ac802c
commit
16d34bcc0a
@ -12,6 +12,8 @@ namespace osu.Game.Storyboards
|
|||||||
|
|
||||||
double StartTime { get; }
|
double StartTime { get; }
|
||||||
|
|
||||||
|
double EndTime { get; }
|
||||||
|
|
||||||
Drawable CreateDrawable();
|
Drawable CreateDrawable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,15 @@ namespace osu.Game.Storyboards
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public double? EarliestEventTime => Layers.SelectMany(l => l.Elements).OrderBy(e => e.StartTime).FirstOrDefault()?.StartTime;
|
public double? EarliestEventTime => Layers.SelectMany(l => l.Elements).OrderBy(e => e.StartTime).FirstOrDefault()?.StartTime;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Across all layers, find the latest point in time that a storyboard element ends at.
|
||||||
|
/// Will return null if there are no elements.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This iterates all elements and as such should be used sparingly or stored locally.
|
||||||
|
/// Videos and samples return StartTime as their EndTIme.
|
||||||
|
/// </remarks>
|
||||||
|
public double? LatestEventTime => Layers.SelectMany(l => l.Elements).OrderByDescending(e => e.EndTime).FirstOrDefault()?.EndTime;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Depth of the currently front-most storyboard layer, excluding the overlay layer.
|
/// Depth of the currently front-most storyboard layer, excluding the overlay layer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -15,6 +15,8 @@ namespace osu.Game.Storyboards
|
|||||||
|
|
||||||
public double StartTime { get; }
|
public double StartTime { get; }
|
||||||
|
|
||||||
|
public double EndTime => StartTime;
|
||||||
|
|
||||||
public int Volume { get; }
|
public int Volume { get; }
|
||||||
|
|
||||||
public IEnumerable<string> LookupNames => new[]
|
public IEnumerable<string> LookupNames => new[]
|
||||||
|
@ -14,6 +14,8 @@ namespace osu.Game.Storyboards
|
|||||||
|
|
||||||
public double StartTime { get; }
|
public double StartTime { get; }
|
||||||
|
|
||||||
|
public double EndTime => StartTime;
|
||||||
|
|
||||||
public StoryboardVideo(string path, int offset)
|
public StoryboardVideo(string path, int offset)
|
||||||
{
|
{
|
||||||
Path = path;
|
Path = path;
|
||||||
|
Loading…
Reference in New Issue
Block a user