mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 18:23:04 +08:00
replace IApplicableToPlayer with IApplicableToDrawableRuleset
This commit is contained in:
parent
cf3aaff7bd
commit
5d274dbce8
@ -1,11 +1,13 @@
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Game.Rulesets.Catch.Objects;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
|
using osu.Game.Rulesets.UI;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Catch.Mods
|
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 Name => "Floating Fruits";
|
||||||
public override string Acronym => "FF";
|
public override string Acronym => "FF";
|
||||||
@ -13,11 +15,12 @@ namespace osu.Game.Rulesets.Catch.Mods
|
|||||||
public override double ScoreMultiplier => 1;
|
public override double ScoreMultiplier => 1;
|
||||||
public override IconUsage? Icon => FontAwesome.Brands.Fly;
|
public override IconUsage? Icon => FontAwesome.Brands.Fly;
|
||||||
|
|
||||||
public void ApplyToPlayer(Player player)
|
public void ApplyToDrawableRuleset(DrawableRuleset<CatchHitObject> drawableRuleset)
|
||||||
{
|
{
|
||||||
player.DrawableRuleset.Anchor = Anchor.Centre;
|
drawableRuleset.Anchor = Anchor.Centre;
|
||||||
player.DrawableRuleset.Origin = Anchor.Centre;
|
drawableRuleset.Origin = Anchor.Centre;
|
||||||
player.DrawableRuleset.Scale = new osuTK.Vector2(1, -1);
|
drawableRuleset.Scale = new osuTK.Vector2(1, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
protected HealthProcessor HealthProcessor { get; private set; }
|
protected HealthProcessor HealthProcessor { get; private set; }
|
||||||
|
|
||||||
public DrawableRuleset DrawableRuleset { get; set; }
|
protected DrawableRuleset DrawableRuleset { get; private set; }
|
||||||
|
|
||||||
protected HUDOverlay HUDOverlay { get; private set; }
|
protected HUDOverlay HUDOverlay { get; private set; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user