mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 06:53:21 +08:00
Change intro test to test full intro screen
This commit is contained in:
parent
8aac0ab0ce
commit
58183ad3d5
@ -4,10 +4,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Timing;
|
using osu.Framework.Timing;
|
||||||
|
using osu.Game.Screens;
|
||||||
using osu.Game.Screens.Menu;
|
using osu.Game.Screens.Menu;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
@ -19,12 +21,16 @@ namespace osu.Game.Tests.Visual.Menus
|
|||||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||||
{
|
{
|
||||||
typeof(OsuLogo),
|
typeof(OsuLogo),
|
||||||
|
typeof(Intro),
|
||||||
|
typeof(StartupScreen),
|
||||||
|
typeof(OsuScreen)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[Cached]
|
||||||
|
private OsuLogo logo;
|
||||||
|
|
||||||
public TestSceneIntroSequence()
|
public TestSceneIntroSequence()
|
||||||
{
|
{
|
||||||
OsuLogo logo;
|
|
||||||
|
|
||||||
var rateAdjustClock = new StopwatchClock(true);
|
var rateAdjustClock = new StopwatchClock(true);
|
||||||
var framedClock = new FramedClock(rateAdjustClock);
|
var framedClock = new FramedClock(rateAdjustClock);
|
||||||
framedClock.ProcessFrame();
|
framedClock.ProcessFrame();
|
||||||
@ -40,14 +46,17 @@ namespace osu.Game.Tests.Visual.Menus
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = Color4.Black,
|
Colour = Color4.Black,
|
||||||
},
|
},
|
||||||
|
new OsuScreenStack(new Intro())
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
},
|
||||||
logo = new OsuLogo
|
logo = new OsuLogo
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
AddStep(@"Restart", logo.PlayIntro);
|
|
||||||
AddSliderStep("Playback speed", 0.0, 2.0, 1, v => rateAdjustClock.Rate = v);
|
AddSliderStep("Playback speed", 0.0, 2.0, 1, v => rateAdjustClock.Rate = v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user