Make the playfield work in TestCaseGamefield.

This commit is contained in:
smoogipooo 2017-05-11 20:04:45 +09:00
parent ee219c18db
commit 0739a76497
3 changed files with 12 additions and 4 deletions

View File

@ -18,6 +18,7 @@ using osu.Game.Rulesets.Taiko.UI;
using System.Collections.Generic;
using osu.Desktop.VisualTests.Beatmaps;
using osu.Framework.Allocation;
using osu.Game.Beatmaps.Timing;
namespace osu.Desktop.VisualTests.Tests
{
@ -52,6 +53,12 @@ namespace osu.Desktop.VisualTests.Tests
time += RNG.Next(50, 500);
}
TimingInfo timing = new TimingInfo();
timing.ControlPoints.Add(new ControlPoint
{
BeatLength = 200
});
WorkingBeatmap beatmap = new TestWorkingBeatmap(new Beatmap
{
HitObjects = objects,
@ -64,8 +71,9 @@ namespace osu.Desktop.VisualTests.Tests
Artist = @"Unknown",
Title = @"Sample Beatmap",
Author = @"peppy",
}
}
},
},
TimingInfo = timing
});
Add(new Drawable[]

View File

@ -52,7 +52,7 @@ namespace osu.Game.Rulesets.Mania.Timing
return;
}
var section = drawableTimingSections.LastOrDefault(t => t.CanContain(drawable)) ?? drawableTimingSections.First();
var section = drawableTimingSections.LastOrDefault(t => t.CanContain(drawable)) ?? drawableTimingSections.FirstOrDefault();
if (section == null)
throw new Exception("Could not find suitable timing section to add object to.");

View File

@ -7,7 +7,7 @@ namespace osu.Game.Beatmaps.Timing
{
public string SampleBank;
public int SampleVolume;
public TimeSignatures TimeSignature;
public TimeSignatures TimeSignature = TimeSignatures.SimpleQuadruple;
public double Time;
public double BeatLength = 500;
public double SpeedMultiplier = 1;