mirror of
https://github.com/ppy/osu
synced 2024-12-24 15:53:37 +00:00
Make the playfield work in TestCaseGamefield.
This commit is contained in:
parent
ee219c18db
commit
0739a76497
@ -18,6 +18,7 @@ using osu.Game.Rulesets.Taiko.UI;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Desktop.VisualTests.Beatmaps;
|
using osu.Desktop.VisualTests.Beatmaps;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Game.Beatmaps.Timing;
|
||||||
|
|
||||||
namespace osu.Desktop.VisualTests.Tests
|
namespace osu.Desktop.VisualTests.Tests
|
||||||
{
|
{
|
||||||
@ -52,6 +53,12 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
time += RNG.Next(50, 500);
|
time += RNG.Next(50, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TimingInfo timing = new TimingInfo();
|
||||||
|
timing.ControlPoints.Add(new ControlPoint
|
||||||
|
{
|
||||||
|
BeatLength = 200
|
||||||
|
});
|
||||||
|
|
||||||
WorkingBeatmap beatmap = new TestWorkingBeatmap(new Beatmap
|
WorkingBeatmap beatmap = new TestWorkingBeatmap(new Beatmap
|
||||||
{
|
{
|
||||||
HitObjects = objects,
|
HitObjects = objects,
|
||||||
@ -64,8 +71,9 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
Artist = @"Unknown",
|
Artist = @"Unknown",
|
||||||
Title = @"Sample Beatmap",
|
Title = @"Sample Beatmap",
|
||||||
Author = @"peppy",
|
Author = @"peppy",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
TimingInfo = timing
|
||||||
});
|
});
|
||||||
|
|
||||||
Add(new Drawable[]
|
Add(new Drawable[]
|
||||||
|
@ -52,7 +52,7 @@ namespace osu.Game.Rulesets.Mania.Timing
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var section = drawableTimingSections.LastOrDefault(t => t.CanContain(drawable)) ?? drawableTimingSections.First();
|
var section = drawableTimingSections.LastOrDefault(t => t.CanContain(drawable)) ?? drawableTimingSections.FirstOrDefault();
|
||||||
|
|
||||||
if (section == null)
|
if (section == null)
|
||||||
throw new Exception("Could not find suitable timing section to add object to.");
|
throw new Exception("Could not find suitable timing section to add object to.");
|
||||||
|
@ -7,7 +7,7 @@ namespace osu.Game.Beatmaps.Timing
|
|||||||
{
|
{
|
||||||
public string SampleBank;
|
public string SampleBank;
|
||||||
public int SampleVolume;
|
public int SampleVolume;
|
||||||
public TimeSignatures TimeSignature;
|
public TimeSignatures TimeSignature = TimeSignatures.SimpleQuadruple;
|
||||||
public double Time;
|
public double Time;
|
||||||
public double BeatLength = 500;
|
public double BeatLength = 500;
|
||||||
public double SpeedMultiplier = 1;
|
public double SpeedMultiplier = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user