// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Graphics; namespace osu.Game.Storyboards { public interface IStoryboardElement { string Path { get; } bool IsDrawable { get; } double StartTime { get; } Drawable CreateDrawable(); } public static class StoryboardElementExtensions { /// /// Returns the end time of this storyboard element. /// /// /// This returns the where available, falling back to otherwise. /// /// The storyboard element. /// The end time of this element. public static double GetEndTime(this IStoryboardElement element) => (element as IStoryboardElementWithDuration)?.EndTime ?? element.StartTime; } }