mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 04:42:58 +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 class TestBeatmap : Beatmap
|
||||||
{
|
{
|
||||||
public TestBeatmap(RulesetInfo ruleset)
|
public TestBeatmap(RulesetInfo ruleset, bool withHitObjects = true)
|
||||||
{
|
{
|
||||||
var baseBeatmap = CreateBeatmap();
|
var baseBeatmap = CreateBeatmap();
|
||||||
|
|
||||||
BeatmapInfo = baseBeatmap.BeatmapInfo;
|
BeatmapInfo = baseBeatmap.BeatmapInfo;
|
||||||
ControlPointInfo = baseBeatmap.ControlPointInfo;
|
ControlPointInfo = baseBeatmap.ControlPointInfo;
|
||||||
Breaks = baseBeatmap.Breaks;
|
Breaks = baseBeatmap.Breaks;
|
||||||
HitObjects = baseBeatmap.HitObjects;
|
|
||||||
|
if (withHitObjects)
|
||||||
|
HitObjects = baseBeatmap.HitObjects;
|
||||||
|
|
||||||
BeatmapInfo.Ruleset = ruleset;
|
BeatmapInfo.Ruleset = ruleset;
|
||||||
BeatmapInfo.RulesetID = ruleset.ID ?? 0;
|
BeatmapInfo.RulesetID = ruleset.ID ?? 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user