From 16f626fb646a637cc908a7d1733457008b7d10ad Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Wed, 6 Apr 2022 01:21:19 +0300 Subject: [PATCH] Add legacy classic taiko player test scene --- .../TestSceneLegacyTaikoPlayer.cs | 28 +++++++++++++++++++ .../TestSceneTaikoPlayer.cs | 9 ++++++ 2 files changed, 37 insertions(+) create mode 100644 osu.Game.Rulesets.Taiko.Tests/TestSceneLegacyTaikoPlayer.cs diff --git a/osu.Game.Rulesets.Taiko.Tests/TestSceneLegacyTaikoPlayer.cs b/osu.Game.Rulesets.Taiko.Tests/TestSceneLegacyTaikoPlayer.cs new file mode 100644 index 0000000000..d1f80768b6 --- /dev/null +++ b/osu.Game.Rulesets.Taiko.Tests/TestSceneLegacyTaikoPlayer.cs @@ -0,0 +1,28 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using osu.Framework.Allocation; +using osu.Game.Database; +using osu.Game.Rulesets.Taiko.Mods; +using osu.Game.Skinning; +using osu.Game.Tests.Visual; + +namespace osu.Game.Rulesets.Taiko.Tests +{ + public class TestSceneLegacyTaikoPlayer : PlayerTestScene + { + protected override Ruleset CreatePlayerRuleset() => new TaikoRuleset(); + + [BackgroundDependencyLoader] + private void load(SkinManager skins) + { + skins.CurrentSkinInfo.Value = DefaultLegacySkin.CreateInfo().ToLiveUnmanaged(); + } + + protected override TestPlayer CreatePlayer(Ruleset ruleset) + { + SelectedMods.Value = new[] { new TaikoModClassic() }; + return base.CreatePlayer(ruleset); + } + } +} diff --git a/osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoPlayer.cs b/osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoPlayer.cs index cd7511241a..8b7a2d0c13 100644 --- a/osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoPlayer.cs +++ b/osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoPlayer.cs @@ -1,6 +1,9 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using osu.Framework.Allocation; +using osu.Game.Database; +using osu.Game.Skinning; using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Taiko.Tests @@ -8,5 +11,11 @@ namespace osu.Game.Rulesets.Taiko.Tests public class TestSceneTaikoPlayer : PlayerTestScene { protected override Ruleset CreatePlayerRuleset() => new TaikoRuleset(); + + [BackgroundDependencyLoader] + private void load(SkinManager skins) + { + skins.CurrentSkinInfo.Value = DefaultSkin.CreateInfo().ToLiveUnmanaged(); + } } }