mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:17:26 +08: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.Timing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Screens.Play;
|
||||
@ -26,13 +27,6 @@ namespace osu.Game.Tests.Visual
|
||||
[BackgroundDependencyLoader]
|
||||
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)
|
||||
{
|
||||
Player p = null;
|
||||
@ -50,6 +44,10 @@ namespace osu.Game.Tests.Visual
|
||||
|
||||
AddCheckSteps();
|
||||
}
|
||||
|
||||
OsuConfigManager manager;
|
||||
Dependencies.Cache(manager = new OsuConfigManager(LocalStorage));
|
||||
manager.GetBindable<double>(OsuSetting.DimLevel).Value = 1.0;
|
||||
}
|
||||
|
||||
protected abstract void AddCheckSteps();
|
||||
|
@ -3,15 +3,13 @@
|
||||
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Game.Tests.Beatmaps;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
@ -29,12 +27,9 @@ namespace osu.Game.Tests.Visual
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Add(new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Color4.Black,
|
||||
Depth = int.MaxValue
|
||||
});
|
||||
OsuConfigManager manager;
|
||||
Dependencies.Cache(manager = new OsuConfigManager(LocalStorage));
|
||||
manager.GetBindable<double>(OsuSetting.DimLevel).Value = 1.0;
|
||||
}
|
||||
|
||||
[SetUpSteps]
|
||||
|
Loading…
Reference in New Issue
Block a user