1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00
osu-lazer/osu.Game.Rulesets.Catch.Tests/TestSceneCatchPlayerLegacySkin.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.4 KiB
C#
Raw Normal View History

// 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.
2022-06-17 15:37:17 +08:00
#nullable disable
2021-05-15 23:02:38 +08:00
using System.Linq;
using NUnit.Framework;
2021-05-15 23:02:38 +08:00
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics.Containers;
2021-05-15 23:02:38 +08:00
using osu.Framework.Screens;
using osu.Framework.Testing;
using osu.Game.Skinning;
using osu.Game.Tests.Visual;
2021-05-15 23:02:38 +08:00
using osuTK;
namespace osu.Game.Rulesets.Catch.Tests
{
[TestFixture]
2020-12-01 08:49:04 +08:00
public partial class TestSceneCatchPlayerLegacySkin : LegacySkinPlayerTestScene
{
protected override Ruleset CreatePlayerRuleset() => new CatchRuleset();
2021-05-15 23:02:38 +08:00
[Test]
public void TestLegacyHUDComboCounterHidden([Values] bool withModifiedSkin)
{
if (withModifiedSkin)
{
AddStep("change component scale", () => Player.ChildrenOfType<LegacyScoreCounter>().First().Scale = new Vector2(2f));
AddStep("update target", () => Player.ChildrenOfType<SkinnableTargetContainer>().ForEach(LegacySkin.UpdateDrawableTarget));
AddStep("exit player", () => Player.Exit());
CreateTest();
2021-05-15 23:02:38 +08:00
}
AddAssert("legacy HUD combo counter hidden", () =>
{
2021-05-20 04:32:16 +08:00
return Player.ChildrenOfType<LegacyComboCounter>().All(c => c.ChildrenOfType<Container>().Single().Alpha == 0f);
2021-05-15 23:02:38 +08:00
});
}
}
}