2020-03-08 13:32:03 +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.Game.Storyboards.Drawables;
|
2024-04-22 18:43:15 +08:00
|
|
|
|
using osuTK;
|
2020-03-08 13:32:03 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Storyboards
|
|
|
|
|
{
|
2024-04-22 18:43:15 +08:00
|
|
|
|
public class StoryboardVideo : StoryboardSprite
|
2020-03-08 13:32:03 +08:00
|
|
|
|
{
|
2023-09-11 22:59:44 +08:00
|
|
|
|
public StoryboardVideo(string path, double offset)
|
2024-04-22 18:43:15 +08:00
|
|
|
|
: base(path, Anchor.Centre, Vector2.Zero)
|
2020-03-08 13:32:03 +08:00
|
|
|
|
{
|
2024-04-23 22:03:32 +08:00
|
|
|
|
// This is just required to get a valid StartTime based on the incoming offset.
|
|
|
|
|
// Actual fades are handled inside DrawableStoryboardVideo for now.
|
2024-05-02 04:57:21 +08:00
|
|
|
|
Commands.AddAlpha(Easing.None, offset, offset, 0, 0);
|
2020-03-08 13:32:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-04-22 18:43:15 +08:00
|
|
|
|
public override Drawable CreateDrawable() => new DrawableStoryboardVideo(this);
|
2020-03-08 13:32:03 +08:00
|
|
|
|
}
|
|
|
|
|
}
|