mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 13:32:54 +08:00
Add ability to create a TestBeatmap with no HitObjects
This commit is contained in:
parent
692f2c8489
commit
da02ee8828
@ -15,14 +15,16 @@ namespace osu.Game.Tests.Beatmaps
|
||||
{
|
||||
public class TestBeatmap : Beatmap
|
||||
{
|
||||
public TestBeatmap(RulesetInfo ruleset)
|
||||
public TestBeatmap(RulesetInfo ruleset, bool withHitObjects = true)
|
||||
{
|
||||
var baseBeatmap = CreateBeatmap();
|
||||
|
||||
BeatmapInfo = baseBeatmap.BeatmapInfo;
|
||||
ControlPointInfo = baseBeatmap.ControlPointInfo;
|
||||
Breaks = baseBeatmap.Breaks;
|
||||
HitObjects = baseBeatmap.HitObjects;
|
||||
|
||||
if (withHitObjects)
|
||||
HitObjects = baseBeatmap.HitObjects;
|
||||
|
||||
BeatmapInfo.Ruleset = ruleset;
|
||||
BeatmapInfo.RulesetID = ruleset.ID ?? 0;
|
||||
|
Loading…
Reference in New Issue
Block a user