2023-06-23 00:37:25 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
2020-11-30 18:56:32 +08:00
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
2021-05-15 23:02:38 +08:00
|
|
|
|
using System.Linq;
|
2020-11-30 18:56:32 +08:00
|
|
|
|
using NUnit.Framework;
|
2021-05-15 23:02:38 +08:00
|
|
|
|
using osu.Framework.Extensions.IEnumerableExtensions;
|
|
|
|
|
using osu.Framework.Screens;
|
|
|
|
|
using osu.Framework.Testing;
|
|
|
|
|
using osu.Game.Skinning;
|
2020-11-30 18:56:32 +08:00
|
|
|
|
using osu.Game.Tests.Visual;
|
2021-05-15 23:02:38 +08:00
|
|
|
|
using osuTK;
|
2020-11-30 18:56:32 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Catch.Tests
|
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
2022-11-24 13:32:20 +08:00
|
|
|
|
public partial class TestSceneCatchPlayerLegacySkin : LegacySkinPlayerTestScene
|
2020-11-30 18:56:32 +08:00
|
|
|
|
{
|
|
|
|
|
protected override Ruleset CreatePlayerRuleset() => new CatchRuleset();
|
2021-05-15 23:02:38 +08:00
|
|
|
|
|
|
|
|
|
[Test]
|
2023-12-30 08:54:53 +08:00
|
|
|
|
public void TestLegacyHUDComboCounterNotExistent([Values] bool withModifiedSkin)
|
2021-05-15 23:02:38 +08:00
|
|
|
|
{
|
|
|
|
|
if (withModifiedSkin)
|
|
|
|
|
{
|
|
|
|
|
AddStep("change component scale", () => Player.ChildrenOfType<LegacyScoreCounter>().First().Scale = new Vector2(2f));
|
2023-02-15 17:31:55 +08:00
|
|
|
|
AddStep("update target", () => Player.ChildrenOfType<SkinComponentsContainer>().ForEach(LegacySkin.UpdateDrawableTarget));
|
2021-05-15 23:02:38 +08:00
|
|
|
|
AddStep("exit player", () => Player.Exit());
|
2022-06-28 14:19:02 +08:00
|
|
|
|
CreateTest();
|
2021-05-15 23:02:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-12-30 10:29:18 +08:00
|
|
|
|
AddAssert("legacy HUD combo counter not added", () => !Player.ChildrenOfType<LegacyDefaultComboCounter>().Any());
|
2021-05-15 23:02:38 +08:00
|
|
|
|
}
|
2020-11-30 18:56:32 +08:00
|
|
|
|
}
|
|
|
|
|
}
|