mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Instantiate HitRenderer with WorkingBeatmap.
This commit is contained in:
@ -8,6 +8,8 @@ using osu.Framework.MathUtils;
|
||||
using osu.Framework.Screens.Testing;
|
||||
using osu.Framework.Timing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.IO;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Modes.Catch.UI;
|
||||
using osu.Game.Modes.Mania.UI;
|
||||
using osu.Game.Modes.Objects;
|
||||
@ -41,10 +43,19 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
time += RNG.Next(50, 500);
|
||||
}
|
||||
|
||||
Beatmap beatmap = new Beatmap
|
||||
WorkingBeatmap beatmap = new TestWorkingBeatmap(new Beatmap
|
||||
{
|
||||
HitObjects = objects
|
||||
};
|
||||
HitObjects = objects,
|
||||
BeatmapInfo = new BeatmapInfo
|
||||
{
|
||||
Metadata = new BeatmapMetadata
|
||||
{
|
||||
Artist = @"Unknown",
|
||||
Title = @"Sample Beatmap",
|
||||
Author = @"peppy",
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Add(new Drawable[]
|
||||
{
|
||||
@ -83,5 +94,16 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private class TestWorkingBeatmap : WorkingBeatmap
|
||||
{
|
||||
public TestWorkingBeatmap(Beatmap beatmap)
|
||||
: base(beatmap.BeatmapInfo, beatmap.BeatmapInfo.BeatmapSet)
|
||||
{
|
||||
Beatmap = beatmap;
|
||||
}
|
||||
|
||||
protected override ArchiveReader GetReader() => null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user