mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 12:57:39 +09:00
Update Testcase inline with framework
This commit is contained in:
parent
6e293501e0
commit
105d57a697
@ -15,6 +15,7 @@ using osu.Game.Graphics.Sprites;
|
|||||||
using osu.Framework.Lists;
|
using osu.Framework.Lists;
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
|
||||||
namespace osu.Desktop.VisualTests.Tests
|
namespace osu.Desktop.VisualTests.Tests
|
||||||
{
|
{
|
||||||
@ -27,11 +28,6 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
public TestCaseBeatSyncedContainer()
|
public TestCaseBeatSyncedContainer()
|
||||||
{
|
{
|
||||||
Clock = new FramedClock();
|
Clock = new FramedClock();
|
||||||
}
|
|
||||||
|
|
||||||
public override void Reset()
|
|
||||||
{
|
|
||||||
base.Reset();
|
|
||||||
Clock.ProcessFrame();
|
Clock.ProcessFrame();
|
||||||
|
|
||||||
Add(new BeatContainer
|
Add(new BeatContainer
|
||||||
@ -45,7 +41,12 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopRight,
|
||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopRight,
|
||||||
});
|
});
|
||||||
mc.State = Visibility.Visible;
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load()
|
||||||
|
{
|
||||||
|
mc.ToggleVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
private class BeatContainer : BeatSyncedContainer
|
private class BeatContainer : BeatSyncedContainer
|
||||||
@ -141,6 +142,8 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
{
|
{
|
||||||
base.OnNewBeat(beatIndex, timingPoint, effectPoint, amplitudes);
|
base.OnNewBeat(beatIndex, timingPoint, effectPoint, amplitudes);
|
||||||
|
|
||||||
|
if (beatIndex < 0) return;
|
||||||
|
|
||||||
timingPointCount.Value = timingPoints.Count;
|
timingPointCount.Value = timingPoints.Count;
|
||||||
currentTimingPoint.Value = timingPoints.IndexOf(timingPoint) + 1;
|
currentTimingPoint.Value = timingPoints.IndexOf(timingPoint) + 1;
|
||||||
beatCount.Value = calculateBeatCount(timingPoint);
|
beatCount.Value = calculateBeatCount(timingPoint);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user