2024-03-07 00:39:28 +08:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Transforms;
|
2024-03-08 08:06:49 +08:00
|
|
|
using osu.Game.Storyboards.Drawables;
|
2024-03-07 00:39:28 +08:00
|
|
|
|
|
|
|
namespace osu.Game.Storyboards.Commands
|
|
|
|
{
|
|
|
|
public interface IStoryboardCommand
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// The start time of the storyboard command.
|
|
|
|
/// </summary>
|
|
|
|
double StartTime { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The end time of the storyboard command.
|
|
|
|
/// </summary>
|
|
|
|
double EndTime { get; }
|
|
|
|
|
2024-03-08 07:02:45 +08:00
|
|
|
/// <summary>
|
|
|
|
/// The name of the <see cref="Drawable"/> property affected by this storyboard command.
|
|
|
|
/// Used to apply initial property values based on the list of commands given in <see cref="StoryboardSprite"/>.
|
|
|
|
/// </summary>
|
|
|
|
string PropertyName { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Sets the value of the corresponding property in <see cref="Drawable"/> to the start value of this command.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="d">The target drawable.</param>
|
2024-03-08 08:06:49 +08:00
|
|
|
void ApplyInitialValue<TDrawable>(TDrawable d)
|
|
|
|
where TDrawable : Drawable, IFlippable, IVectorScalable;
|
2024-03-08 07:02:45 +08:00
|
|
|
|
2024-03-07 00:39:28 +08:00
|
|
|
/// <summary>
|
|
|
|
/// Applies the transforms described by this storyboard command to the target drawable.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="d">The target drawable.</param>
|
|
|
|
/// <returns>The sequence of transforms applied to the target drawable.</returns>
|
2024-03-08 08:06:49 +08:00
|
|
|
TransformSequence<TDrawable> ApplyTransforms<TDrawable>(TDrawable d)
|
|
|
|
where TDrawable : Drawable, IFlippable, IVectorScalable;
|
2024-03-07 00:39:28 +08:00
|
|
|
}
|
|
|
|
}
|