2020-04-17 15:32:12 +08:00
|
|
|
|
// 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.
|
|
|
|
|
|
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
|
|
|
|
|
{
|
|
|
|
|
public partial class TestSceneManiaPlayer : PlayerTestScene
|
|
|
|
|
{
|
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
|
|
|
|
}
|
|
|
|
|
}
|