1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-07 17:27:25 +08:00

Merge pull request #23024 from bdach/mania-argon-explosion-upscroll

Fix hit lighting misalignment on argon skin with upscroll
This commit is contained in:
Dean Herbert 2023-03-28 15:05:15 +09:00 committed by GitHub
commit e9fd17461b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 2 deletions

View File

@ -3,6 +3,9 @@
#nullable disable
using osu.Framework.Extensions.ObjectExtensions;
using osu.Game.Rulesets.Mania.Configuration;
using osu.Game.Rulesets.Mania.UI;
using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Mania.Tests
@ -10,5 +13,19 @@ namespace osu.Game.Rulesets.Mania.Tests
public partial class TestSceneManiaPlayer : PlayerTestScene
{
protected override Ruleset CreatePlayerRuleset() => new ManiaRuleset();
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);
}
}
}

View File

@ -43,8 +43,6 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
{
largeFaint = new Container
{
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
RelativeSizeAxes = Axes.Both,
Height = ArgonNotePiece.NOTE_ACCENT_RATIO,
Masking = true,
@ -81,11 +79,15 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
if (direction.NewValue == ScrollingDirection.Up)
{
Anchor = Anchor.TopCentre;
largeFaint.Anchor = Anchor.TopCentre;
largeFaint.Origin = Anchor.TopCentre;
Y = ArgonNotePiece.NOTE_HEIGHT / 2;
}
else
{
Anchor = Anchor.BottomCentre;
largeFaint.Anchor = Anchor.BottomCentre;
largeFaint.Origin = Anchor.BottomCentre;
Y = -ArgonNotePiece.NOTE_HEIGHT / 2;
}
}