1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 15:22:55 +08:00

replace IApplicableToPlayer with IApplicableToDrawableRuleset

This commit is contained in:
Fabian 2021-04-17 16:38:28 +02:00
parent cf3aaff7bd
commit 5d274dbce8
2 changed files with 9 additions and 6 deletions

View File

@ -1,11 +1,13 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.UI;
using osu.Game.Screens.Play;
namespace osu.Game.Rulesets.Catch.Mods
{
public class CatchModFloatingFruits : Mod, IApplicableToPlayer
public class CatchModFloatingFruits : Mod, IApplicableToDrawableRuleset<CatchHitObject>
{
public override string Name => "Floating Fruits";
public override string Acronym => "FF";
@ -13,11 +15,12 @@ namespace osu.Game.Rulesets.Catch.Mods
public override double ScoreMultiplier => 1;
public override IconUsage? Icon => FontAwesome.Brands.Fly;
public void ApplyToPlayer(Player player)
public void ApplyToDrawableRuleset(DrawableRuleset<CatchHitObject> drawableRuleset)
{
player.DrawableRuleset.Anchor = Anchor.Centre;
player.DrawableRuleset.Origin = Anchor.Centre;
player.DrawableRuleset.Scale = new osuTK.Vector2(1, -1);
}
drawableRuleset.Anchor = Anchor.Centre;
drawableRuleset.Origin = Anchor.Centre;
drawableRuleset.Scale = new osuTK.Vector2(1, -1);
}
}
}

View File

@ -110,7 +110,7 @@ namespace osu.Game.Screens.Play
protected HealthProcessor HealthProcessor { get; private set; }
public DrawableRuleset DrawableRuleset { get; set; }
protected DrawableRuleset DrawableRuleset { get; private set; }
protected HUDOverlay HUDOverlay { get; private set; }