2023-06-23 00:37:25 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
2021-04-16 05:17:02 +08:00
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Storyboards
|
|
|
|
|
{
|
2021-04-18 03:27:22 +08:00
|
|
|
|
/// <summary>
|
2021-04-18 11:35:54 +08:00
|
|
|
|
/// A <see cref="IStoryboardElement"/> that ends at a different time than its start time.
|
2021-04-18 03:27:22 +08:00
|
|
|
|
/// </summary>
|
2021-04-18 12:45:24 +08:00
|
|
|
|
public interface IStoryboardElementWithDuration : IStoryboardElement
|
2021-04-16 05:17:02 +08:00
|
|
|
|
{
|
2021-04-18 11:35:54 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The time at which the <see cref="IStoryboardElement"/> ends.
|
2023-04-25 14:22:11 +08:00
|
|
|
|
/// This is consumed to extend the length of a storyboard to ensure all visuals are played to completion.
|
2021-04-18 11:35:54 +08:00
|
|
|
|
/// </summary>
|
2021-04-16 05:17:02 +08:00
|
|
|
|
double EndTime { get; }
|
2021-04-18 12:45:24 +08:00
|
|
|
|
|
2023-04-25 14:22:11 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The time this element displays until.
|
|
|
|
|
/// This is used for lifetime purposes, and includes long playing animations which don't necessarily extend
|
|
|
|
|
/// a storyboard's play time.
|
|
|
|
|
/// </summary>
|
|
|
|
|
double EndTimeForDisplay { get; }
|
|
|
|
|
|
2021-04-18 12:45:24 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The duration of the StoryboardElement.
|
|
|
|
|
/// </summary>
|
2021-05-04 15:04:59 +08:00
|
|
|
|
double Duration => EndTime - StartTime;
|
2021-04-16 05:17:02 +08:00
|
|
|
|
}
|
|
|
|
|
}
|