1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-18 08:12:55 +08:00
osu-lazer/osu.Game/Storyboards/StoryboardSample.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.0 KiB
C#
Raw Normal View History

// 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.
2018-04-13 17:19:50 +08:00
2022-06-17 15:37:17 +08:00
#nullable disable
using System.Collections.Generic;
2017-09-08 05:55:05 +08:00
using osu.Framework.Graphics;
using osu.Game.Audio;
2018-06-28 12:43:56 +08:00
using osu.Game.Storyboards.Drawables;
2018-04-13 17:19:50 +08:00
2017-09-08 05:55:05 +08:00
namespace osu.Game.Storyboards
{
public class StoryboardSampleInfo : IStoryboardElement, ISampleInfo
2017-09-08 05:55:05 +08:00
{
public string Path { get; }
2018-06-28 12:43:56 +08:00
public bool IsDrawable => true;
2018-04-13 17:19:50 +08:00
public double StartTime { get; }
public int Volume { get; }
2018-04-13 17:19:50 +08:00
2019-08-23 19:55:06 +08:00
public IEnumerable<string> LookupNames => new[]
{
// Try first with the full name, then attempt with no path
Path,
System.IO.Path.ChangeExtension(Path, null),
};
public StoryboardSampleInfo(string path, double time, int volume)
2017-09-08 05:55:05 +08:00
{
Path = path;
StartTime = time;
2017-09-08 05:55:05 +08:00
Volume = volume;
}
2018-04-13 17:19:50 +08:00
2018-06-28 12:43:56 +08:00
public Drawable CreateDrawable() => new DrawableStoryboardSample(this);
2017-09-08 05:55:05 +08:00
}
}