1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 04:27:34 +08:00
osu-lazer/osu.Game.Rulesets.Catch/Mods/CatchModFloatingFruits.cs
Dean Herbert 08b3c0cce0 Change "floating fruits" mod to only apply adjustments to the playfield
Avoids things like touch screen inputs also being flipped.

Note that these adjustments can't be applied directly to the playfield
due to how playfields are used in various rulesets (basically relying on
the `PlayfieldAdjustContainer` to get things in the right place).

Closes #24000.
2023-06-23 14:18:43 +09:00

31 lines
1.2 KiB
C#

// 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.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.UI;
using osuTK;
namespace osu.Game.Rulesets.Catch.Mods
{
public class CatchModFloatingFruits : Mod, IApplicableToDrawableRuleset<CatchHitObject>
{
public override string Name => "Floating Fruits";
public override string Acronym => "FF";
public override LocalisableString Description => "The fruits are... floating?";
public override double ScoreMultiplier => 1;
public override IconUsage? Icon => FontAwesome.Solid.Cloud;
public void ApplyToDrawableRuleset(DrawableRuleset<CatchHitObject> drawableRuleset)
{
drawableRuleset.PlayfieldAdjustmentContainer.Anchor = Anchor.Centre;
drawableRuleset.PlayfieldAdjustmentContainer.Origin = Anchor.Centre;
drawableRuleset.PlayfieldAdjustmentContainer.Scale = new Vector2(1, -1);
}
}
}