mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 13:33:52 +08: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 EndTime { get; }
|
||||
|
||||
Drawable CreateDrawable();
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +36,15 @@ namespace osu.Game.Storyboards
|
||||
/// </remarks>
|
||||
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>
|
||||
/// Depth of the currently front-most storyboard layer, excluding the overlay layer.
|
||||
/// </summary>
|
||||
|
@ -15,6 +15,8 @@ namespace osu.Game.Storyboards
|
||||
|
||||
public double StartTime { get; }
|
||||
|
||||
public double EndTime => StartTime;
|
||||
|
||||
public int Volume { get; }
|
||||
|
||||
public IEnumerable<string> LookupNames => new[]
|
||||
|
@ -14,6 +14,8 @@ namespace osu.Game.Storyboards
|
||||
|
||||
public double StartTime { get; }
|
||||
|
||||
public double EndTime => StartTime;
|
||||
|
||||
public StoryboardVideo(string path, int offset)
|
||||
{
|
||||
Path = path;
|
||||
|
Loading…
Reference in New Issue
Block a user