2023-06-23 00:37:25 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
2020-04-17 15:32:12 +08:00
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
2023-03-28 00:08:06 +08:00
|
|
|
|
using osu.Framework.Extensions.ObjectExtensions;
|
|
|
|
|
using osu.Game.Rulesets.Mania.Configuration;
|
|
|
|
|
using osu.Game.Rulesets.Mania.UI;
|
2020-04-17 15:32:12 +08:00
|
|
|
|
using osu.Game.Tests.Visual;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Mania.Tests
|
|
|
|
|
{
|
2022-11-24 13:32:20 +08:00
|
|
|
|
public partial class TestSceneManiaPlayer : PlayerTestScene
|
2020-04-17 15:32:12 +08:00
|
|
|
|
{
|
2020-04-23 18:25:06 +08:00
|
|
|
|
protected override Ruleset CreatePlayerRuleset() => new ManiaRuleset();
|
2023-03-28 00:08:06 +08:00
|
|
|
|
|
|
|
|
|
public override void SetUpSteps()
|
|
|
|
|
{
|
|
|
|
|
base.SetUpSteps();
|
|
|
|
|
|
|
|
|
|
AddStep("change direction to down", () => changeDirectionTo(ManiaScrollingDirection.Down));
|
|
|
|
|
AddStep("change direction to up", () => changeDirectionTo(ManiaScrollingDirection.Up));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void changeDirectionTo(ManiaScrollingDirection direction)
|
|
|
|
|
{
|
|
|
|
|
var rulesetConfig = (ManiaRulesetConfigManager)RulesetConfigs.GetConfigFor(new ManiaRuleset()).AsNonNull();
|
|
|
|
|
rulesetConfig.SetValue(ManiaRulesetSetting.ScrollDirection, direction);
|
|
|
|
|
}
|
2020-04-17 15:32:12 +08:00
|
|
|
|
}
|
|
|
|
|
}
|