Initial rewrite of timing changes to allow them to be more extensible.

This commit is contained in:
smoogipooo
2017-06-01 14:26:21 +09:00
parent e348f86ce1
commit f612914e87
8 changed files with 191 additions and 171 deletions

View File

@ -14,6 +14,7 @@ using osu.Game.Rulesets.Mania.Timing;
using osu.Framework.Configuration;
using OpenTK.Input;
using osu.Framework.Timing;
using osu.Framework.Extensions.IEnumerableExtensions;
namespace osu.Desktop.VisualTests.Tests
{
@ -30,7 +31,7 @@ namespace osu.Desktop.VisualTests.Tests
Action<int, SpecialColumnPosition> createPlayfield = (cols, pos) =>
{
Clear();
Add(new ManiaPlayfield(cols, new List<TimingChange>())
Add(new ManiaPlayfield(cols)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
@ -44,7 +45,7 @@ namespace osu.Desktop.VisualTests.Tests
Clear();
ManiaPlayfield playField;
Add(playField = new ManiaPlayfield(cols, new List<TimingChange> { new TimingChange { BeatLength = 200 } })
Add(playField = new ManiaPlayfield(cols)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
@ -52,6 +53,8 @@ namespace osu.Desktop.VisualTests.Tests
Scale = new Vector2(1, -1)
});
playField.Columns.ForEach(c => c.Add(new DrawableScrollingTimingChange(new TimingChange { BeatLength = 200 })));
for (int i = 0; i < cols; i++)
{
playField.Add(new DrawableNote(new Note
@ -69,7 +72,7 @@ namespace osu.Desktop.VisualTests.Tests
var rateAdjustClock = new StopwatchClock(true) { Rate = 0.5 };
ManiaPlayfield playField;
Add(playField = new ManiaPlayfield(4, new List<TimingChange> { new TimingChange { BeatLength = 200 } })
Add(playField = new ManiaPlayfield(4)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
@ -77,6 +80,8 @@ namespace osu.Desktop.VisualTests.Tests
Clock = new FramedClock(rateAdjustClock)
});
playField.Columns.ForEach(c => c.Add(new DrawableScrollingTimingChange(new TimingChange { BeatLength = 200 })));
for (int t = 1000; t <= 2000; t += 100)
{
playField.Add(new DrawableNote(new Note