// 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 object. /// /// /// This returns the where available, falling back to otherwise. /// /// The object. /// The end time of this object. public static double GetEndTime(this IStoryboardElement storyboardElement) => (storyboardElement as IStoryboardElementHasDuration)?.EndTime ?? storyboardElement.StartTime; } }