mirror of
https://github.com/ppy/osu
synced 2025-01-16 02:51:20 +00:00
Add back flashlight testcase
This commit is contained in:
parent
846a4835ca
commit
dba4ccdf74
18
osu.Game.Rulesets.Osu.Tests/TestCaseFlashlight.cs
Normal file
18
osu.Game.Rulesets.Osu.Tests/TestCaseFlashlight.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Game.Rulesets.Mods;
|
||||||
|
using osu.Game.Rulesets.Osu.Mods;
|
||||||
|
using osu.Game.Screens.Play;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Osu.Tests
|
||||||
|
{
|
||||||
|
public class TestCaseFlashlight : TestCaseOsuPlayer
|
||||||
|
{
|
||||||
|
protected override Player CreatePlayer(Ruleset ruleset)
|
||||||
|
{
|
||||||
|
Beatmap.Value.Mods.Value = new Mod[] { new OsuModAutoplay(), new OsuModFlashlight(), };
|
||||||
|
return base.CreatePlayer(ruleset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -7,6 +7,7 @@ using osu.Framework.Graphics.Shapes;
|
|||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Framework.Timing;
|
using osu.Framework.Timing;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
@ -26,13 +27,6 @@ namespace osu.Game.Tests.Visual
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(RulesetStore rulesets)
|
private void load(RulesetStore rulesets)
|
||||||
{
|
{
|
||||||
Add(new Box
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Framework.Graphics.Axes.Both,
|
|
||||||
Colour = Color4.Black,
|
|
||||||
Depth = int.MaxValue
|
|
||||||
});
|
|
||||||
|
|
||||||
foreach (var r in rulesets.AvailableRulesets)
|
foreach (var r in rulesets.AvailableRulesets)
|
||||||
{
|
{
|
||||||
Player p = null;
|
Player p = null;
|
||||||
@ -50,6 +44,10 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
AddCheckSteps();
|
AddCheckSteps();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OsuConfigManager manager;
|
||||||
|
Dependencies.Cache(manager = new OsuConfigManager(LocalStorage));
|
||||||
|
manager.GetBindable<double>(OsuSetting.DimLevel).Value = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void AddCheckSteps();
|
protected abstract void AddCheckSteps();
|
||||||
|
@ -3,15 +3,13 @@
|
|||||||
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Framework.Graphics.Shapes;
|
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
using osu.Game.Tests.Beatmaps;
|
using osu.Game.Tests.Beatmaps;
|
||||||
using osuTK.Graphics;
|
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual
|
||||||
{
|
{
|
||||||
@ -29,12 +27,9 @@ namespace osu.Game.Tests.Visual
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
Add(new Box
|
OsuConfigManager manager;
|
||||||
{
|
Dependencies.Cache(manager = new OsuConfigManager(LocalStorage));
|
||||||
RelativeSizeAxes = Axes.Both,
|
manager.GetBindable<double>(OsuSetting.DimLevel).Value = 1.0;
|
||||||
Colour = Color4.Black,
|
|
||||||
Depth = int.MaxValue
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[SetUpSteps]
|
[SetUpSteps]
|
||||||
|
Loading…
Reference in New Issue
Block a user