2019-01-24 08:43:03 +00: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.
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2022-06-17 07:37:17 +00:00
|
|
|
|
#nullable disable
|
|
|
|
|
|
2021-04-17 15:47:13 +00:00
|
|
|
|
using System.IO;
|
2020-04-14 12:05:42 +00:00
|
|
|
|
using osu.Framework.Audio;
|
2017-09-18 13:32:49 +00:00
|
|
|
|
using osu.Framework.Audio.Track;
|
|
|
|
|
using osu.Framework.Graphics.Textures;
|
|
|
|
|
using osu.Game.Beatmaps;
|
2021-05-21 17:16:51 +00:00
|
|
|
|
using osu.Game.Skinning;
|
2019-11-21 09:50:54 +00:00
|
|
|
|
using osu.Game.Storyboards;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2017-09-18 13:32:49 +00:00
|
|
|
|
namespace osu.Game.Tests.Beatmaps
|
|
|
|
|
{
|
|
|
|
|
public class TestWorkingBeatmap : WorkingBeatmap
|
|
|
|
|
{
|
2019-02-19 03:16:44 +00:00
|
|
|
|
private readonly IBeatmap beatmap;
|
2019-11-21 09:50:54 +00:00
|
|
|
|
private readonly Storyboard storyboard;
|
2019-02-19 03:16:44 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Create an instance which provides the <see cref="IBeatmap"/> when requested.
|
|
|
|
|
/// </summary>
|
2019-11-21 09:50:54 +00:00
|
|
|
|
/// <param name="beatmap">The beatmap.</param>
|
|
|
|
|
/// <param name="storyboard">An optional storyboard.</param>
|
2020-04-14 12:05:42 +00:00
|
|
|
|
/// <param name="audioManager">The <see cref="AudioManager"/>.</param>
|
|
|
|
|
public TestWorkingBeatmap(IBeatmap beatmap, Storyboard storyboard = null, AudioManager audioManager = null)
|
|
|
|
|
: base(beatmap.BeatmapInfo, audioManager)
|
2017-09-18 13:32:49 +00:00
|
|
|
|
{
|
|
|
|
|
this.beatmap = beatmap;
|
2019-11-21 09:50:54 +00:00
|
|
|
|
this.storyboard = storyboard;
|
2017-09-18 13:32:49 +00:00
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2020-04-30 07:42:38 +00:00
|
|
|
|
public override bool BeatmapLoaded => true;
|
|
|
|
|
|
2018-04-19 11:44:38 +00:00
|
|
|
|
protected override IBeatmap GetBeatmap() => beatmap;
|
2019-02-19 03:16:44 +00:00
|
|
|
|
|
2019-11-21 09:50:54 +00:00
|
|
|
|
protected override Storyboard GetStoryboard() => storyboard ?? base.GetStoryboard();
|
|
|
|
|
|
2021-08-15 16:38:01 +00:00
|
|
|
|
protected internal override ISkin GetSkin() => null;
|
2021-05-21 17:16:51 +00:00
|
|
|
|
|
2021-04-17 15:47:13 +00:00
|
|
|
|
public override Stream GetStream(string storagePath) => null;
|
|
|
|
|
|
2019-05-31 05:40:53 +00:00
|
|
|
|
protected override Texture GetBackground() => null;
|
2019-02-19 03:35:52 +00:00
|
|
|
|
|
2020-08-07 13:31:41 +00:00
|
|
|
|
protected override Track GetBeatmapTrack() => null;
|
2017-09-18 13:32:49 +00:00
|
|
|
|
}
|
|
|
|
|
}
|