mirror of
https://github.com/ppy/osu
synced 2025-01-01 03:42:19 +00:00
Added traceable mod + HideButApproachCircle function for DrawableHitCircle
This commit is contained in:
parent
3322eb47b3
commit
1366b53a71
32
osu.Game.Rulesets.Osu/Mods/OsuModTraceable.cs
Normal file
32
osu.Game.Rulesets.Osu/Mods/OsuModTraceable.cs
Normal file
@ -0,0 +1,32 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Mods
|
||||
{
|
||||
internal class OsuModTraceable : Mod, IApplicableToDrawableHitObjects
|
||||
{
|
||||
public override string Name => "Traceable";
|
||||
public override string ShortenedName => "TC";
|
||||
public override FontAwesome Icon => FontAwesome.fa_snapchat_ghost;
|
||||
public override ModType Type => ModType.Fun;
|
||||
public override string Description => "Put your faith in the approach circles...";
|
||||
public override double ScoreMultiplier => 1;
|
||||
|
||||
public void ApplyToDrawableHitObjects(IEnumerable<DrawableHitObject> drawables)
|
||||
{
|
||||
foreach (var drawable in drawables)
|
||||
{
|
||||
if (drawable is DrawableHitCircle c)
|
||||
c.HideButApproachCircle();
|
||||
if (drawable is DrawableSlider s)
|
||||
s.HeadCircle.HideButApproachCircle();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -76,6 +76,15 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
}
|
||||
}
|
||||
|
||||
public void HideButApproachCircle()
|
||||
{
|
||||
circle.Hide();
|
||||
circle.AlwaysPresent = true;
|
||||
ring.Hide();
|
||||
number.Hide();
|
||||
glow.Hide();
|
||||
}
|
||||
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (!userTriggered)
|
||||
|
@ -121,6 +121,7 @@ namespace osu.Game.Rulesets.Osu
|
||||
return new Mod[] {
|
||||
new OsuModTransform(),
|
||||
new OsuModWiggle(),
|
||||
new OsuModTraceable(),
|
||||
};
|
||||
default:
|
||||
return new Mod[] { };
|
||||
|
Loading…
Reference in New Issue
Block a user