mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
implement FI by flipping HD upside down
This commit is contained in:
@ -3,6 +3,9 @@
|
|||||||
|
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Rulesets.Mania.Objects;
|
||||||
|
using osu.Game.Rulesets.UI;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mania.Mods
|
namespace osu.Game.Rulesets.Mania.Mods
|
||||||
{
|
{
|
||||||
@ -12,5 +15,11 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
public override string Acronym => "FI";
|
public override string Acronym => "FI";
|
||||||
public override IconUsage? Icon => OsuIcon.ModHidden;
|
public override IconUsage? Icon => OsuIcon.ModHidden;
|
||||||
public override string Description => @"Keys appear out of nowhere!";
|
public override string Description => @"Keys appear out of nowhere!";
|
||||||
|
|
||||||
|
public override void ApplyToDrawableRuleset(DrawableRuleset<ManiaHitObject> drawableRuleset)
|
||||||
|
{
|
||||||
|
base.ApplyToDrawableRuleset(drawableRuleset);
|
||||||
|
laneCovers.ForEach(laneCover => laneCover.Scale = new Vector2(1f, -1f));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
@ -24,8 +25,9 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
public override string Description => @"Keys fade out before you hit them!";
|
public override string Description => @"Keys fade out before you hit them!";
|
||||||
public override double ScoreMultiplier => 1;
|
public override double ScoreMultiplier => 1;
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(ModFlashlight<ManiaHitObject>) };
|
public override Type[] IncompatibleMods => new[] { typeof(ModFlashlight<ManiaHitObject>) };
|
||||||
|
protected List<LaneCover> laneCovers = new List<LaneCover>();
|
||||||
|
|
||||||
public void ApplyToDrawableRuleset(DrawableRuleset<ManiaHitObject> drawableRuleset)
|
public virtual void ApplyToDrawableRuleset(DrawableRuleset<ManiaHitObject> drawableRuleset)
|
||||||
{
|
{
|
||||||
ManiaPlayfield maniaPlayfield = (ManiaPlayfield)drawableRuleset.Playfield;
|
ManiaPlayfield maniaPlayfield = (ManiaPlayfield)drawableRuleset.Playfield;
|
||||||
|
|
||||||
@ -34,6 +36,8 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
HitObjectContainer hoc = column.HitObjectArea.HitObjectContainer;
|
HitObjectContainer hoc = column.HitObjectArea.HitObjectContainer;
|
||||||
Container hocParent = (Container)hoc.Parent;
|
Container hocParent = (Container)hoc.Parent;
|
||||||
|
|
||||||
|
LaneCover laneCover;
|
||||||
|
|
||||||
hocParent.Remove(hoc);
|
hocParent.Remove(hoc);
|
||||||
hocParent.Add(new BufferedContainer
|
hocParent.Add(new BufferedContainer
|
||||||
{
|
{
|
||||||
@ -41,7 +45,7 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
hoc,
|
hoc,
|
||||||
new LaneCover
|
laneCover = new LaneCover
|
||||||
{
|
{
|
||||||
Coverage = 0.5f,
|
Coverage = 0.5f,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -50,10 +54,12 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
laneCovers.Add(laneCover);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class LaneCover : CompositeDrawable
|
protected class LaneCover : CompositeDrawable
|
||||||
{
|
{
|
||||||
private readonly Box gradient;
|
private readonly Box gradient;
|
||||||
private readonly Box filled;
|
private readonly Box filled;
|
||||||
|
Reference in New Issue
Block a user