Added traceable mod + HideButApproachCircle function for DrawableHitCircle

This commit is contained in:
MaxOhn 2018-10-09 13:16:27 +02:00
parent 3322eb47b3
commit 1366b53a71
3 changed files with 42 additions and 0 deletions

View 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();
}
}
}
}

View File

@ -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)

View File

@ -121,6 +121,7 @@ namespace osu.Game.Rulesets.Osu
return new Mod[] {
new OsuModTransform(),
new OsuModWiggle(),
new OsuModTraceable(),
};
default:
return new Mod[] { };