mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 03:25:11 +08:00
Add beat timings to TestCaseBeatSyncedContainer
This commit is contained in:
parent
d9b362489b
commit
7729760017
@ -58,6 +58,8 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
private readonly InfoString currentBeat;
|
private readonly InfoString currentBeat;
|
||||||
private readonly InfoString beatsPerMinute;
|
private readonly InfoString beatsPerMinute;
|
||||||
private readonly InfoString adjustedBeatLength;
|
private readonly InfoString adjustedBeatLength;
|
||||||
|
private readonly InfoString timeUntilNextBeat;
|
||||||
|
private readonly InfoString timeSinceLastBeat;
|
||||||
|
|
||||||
private readonly Box flashLayer;
|
private readonly Box flashLayer;
|
||||||
|
|
||||||
@ -95,6 +97,8 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
currentBeat = new InfoString(@"Current beat"),
|
currentBeat = new InfoString(@"Current beat"),
|
||||||
beatsPerMinute = new InfoString(@"BPM"),
|
beatsPerMinute = new InfoString(@"BPM"),
|
||||||
adjustedBeatLength = new InfoString(@"Adjusted beat length"),
|
adjustedBeatLength = new InfoString(@"Adjusted beat length"),
|
||||||
|
timeUntilNextBeat = new InfoString(@"Time until next beat"),
|
||||||
|
timeSinceLastBeat = new InfoString(@"Time since last beat"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -131,6 +135,8 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
currentBeat.Value = 0;
|
currentBeat.Value = 0;
|
||||||
beatsPerMinute.Value = 0;
|
beatsPerMinute.Value = 0;
|
||||||
adjustedBeatLength.Value = 0;
|
adjustedBeatLength.Value = 0;
|
||||||
|
timeUntilNextBeat.Value = 0;
|
||||||
|
timeSinceLastBeat.Value = 0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,6 +157,13 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
return (int)Math.Ceiling((getNextTimingPoint(current).Time - current.Time) / current.BeatLength);
|
return (int)Math.Ceiling((getNextTimingPoint(current).Time - current.Time) / current.BeatLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void Update()
|
||||||
|
{
|
||||||
|
base.Update();
|
||||||
|
timeUntilNextBeat.Value = TimeUntilNextBeat;
|
||||||
|
timeSinceLastBeat.Value = TimeSinceLastBeat;
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes)
|
protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes)
|
||||||
{
|
{
|
||||||
base.OnNewBeat(beatIndex, timingPoint, effectPoint, amplitudes);
|
base.OnNewBeat(beatIndex, timingPoint, effectPoint, amplitudes);
|
||||||
|
Loading…
Reference in New Issue
Block a user