mirror of
https://github.com/ppy/osu
synced 2024-12-28 18:02:53 +00:00
Cleanup code in ModHidden
This commit is contained in:
parent
a1d63243a4
commit
67dfeeb1b7
@ -54,7 +54,7 @@ namespace osu.Game.Rulesets.Catch.Mods
|
||||
var offset = hitObject.TimePreempt * fade_out_offset_multiplier;
|
||||
var duration = offset - hitObject.TimePreempt * fade_out_duration_multiplier;
|
||||
|
||||
using (drawable.BeginAbsoluteSequence(hitObject.StartTime - offset, true))
|
||||
using (drawable.BeginAbsoluteSequence(hitObject.StartTime - offset))
|
||||
drawable.FadeOut(duration);
|
||||
}
|
||||
}
|
||||
|
@ -65,13 +65,13 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
switch (drawableObject)
|
||||
{
|
||||
case DrawableSliderTail _:
|
||||
using (drawableObject.BeginAbsoluteSequence(fadeOut.startTime, true))
|
||||
using (drawableObject.BeginAbsoluteSequence(fadeOut.startTime))
|
||||
drawableObject.FadeOut(fadeOut.duration);
|
||||
|
||||
break;
|
||||
|
||||
case DrawableSliderRepeat sliderRepeat:
|
||||
using (drawableObject.BeginAbsoluteSequence(fadeOut.startTime, true))
|
||||
using (drawableObject.BeginAbsoluteSequence(fadeOut.startTime))
|
||||
// only apply to circle piece – reverse arrow is not affected by hidden.
|
||||
sliderRepeat.CirclePiece.FadeOut(fadeOut.duration);
|
||||
|
||||
@ -88,22 +88,22 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
else
|
||||
{
|
||||
// we don't want to see the approach circle
|
||||
using (circle.BeginAbsoluteSequence(hitObject.StartTime - hitObject.TimePreempt, true))
|
||||
using (circle.BeginAbsoluteSequence(hitObject.StartTime - hitObject.TimePreempt))
|
||||
circle.ApproachCircle.Hide();
|
||||
}
|
||||
|
||||
using (drawableObject.BeginAbsoluteSequence(fadeOut.startTime, true))
|
||||
using (drawableObject.BeginAbsoluteSequence(fadeOut.startTime))
|
||||
fadeTarget.FadeOut(fadeOut.duration);
|
||||
break;
|
||||
|
||||
case DrawableSlider slider:
|
||||
using (slider.BeginAbsoluteSequence(fadeOut.startTime, true))
|
||||
using (slider.BeginAbsoluteSequence(fadeOut.startTime))
|
||||
slider.Body.FadeOut(fadeOut.duration, Easing.Out);
|
||||
|
||||
break;
|
||||
|
||||
case DrawableSliderTick sliderTick:
|
||||
using (sliderTick.BeginAbsoluteSequence(fadeOut.startTime, true))
|
||||
using (sliderTick.BeginAbsoluteSequence(fadeOut.startTime))
|
||||
sliderTick.FadeOut(fadeOut.duration);
|
||||
|
||||
break;
|
||||
@ -112,7 +112,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
// hide elements we don't care about.
|
||||
// todo: hide background
|
||||
|
||||
using (spinner.BeginAbsoluteSequence(fadeOut.startTime, true))
|
||||
using (spinner.BeginAbsoluteSequence(fadeOut.startTime))
|
||||
spinner.FadeOut(fadeOut.duration);
|
||||
|
||||
break;
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
@ -18,14 +17,6 @@ namespace osu.Game.Rulesets.Mods
|
||||
public override ModType Type => ModType.DifficultyIncrease;
|
||||
public override bool Ranked => true;
|
||||
|
||||
/// <summary>
|
||||
/// Check whether the provided hitobject should be considered the "first" hideable object.
|
||||
/// Can be used to skip spinners, for instance.
|
||||
/// </summary>
|
||||
/// <param name="hitObject">The hitobject to check.</param>
|
||||
[Obsolete("Use IsFirstAdjustableObject() instead.")] // Can be removed 20210506
|
||||
protected virtual bool IsFirstHideableObject(DrawableHitObject hitObject) => true;
|
||||
|
||||
public void ApplyToScoreProcessor(ScoreProcessor scoreProcessor)
|
||||
{
|
||||
// Default value of ScoreProcessor's Rank in Hidden Mod should be SS+
|
||||
@ -49,36 +40,10 @@ namespace osu.Game.Rulesets.Mods
|
||||
|
||||
protected override void ApplyIncreasedVisibilityState(DrawableHitObject hitObject, ArmedState state)
|
||||
{
|
||||
#pragma warning disable 618
|
||||
ApplyFirstObjectIncreaseVisibilityState(hitObject, state);
|
||||
#pragma warning restore 618
|
||||
}
|
||||
|
||||
protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state)
|
||||
{
|
||||
#pragma warning disable 618
|
||||
ApplyHiddenState(hitObject, state);
|
||||
#pragma warning restore 618
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Apply a special visibility state to the first object in a beatmap, if the user chooses to turn on the "increase first object visibility" setting.
|
||||
/// </summary>
|
||||
/// <param name="hitObject">The hit object to apply the state change to.</param>
|
||||
/// <param name="state">The state of the hit object.</param>
|
||||
[Obsolete("Use ApplyIncreasedVisibilityState() instead.")] // Can be removed 20210506
|
||||
protected virtual void ApplyFirstObjectIncreaseVisibilityState(DrawableHitObject hitObject, ArmedState state)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Apply a hidden state to the provided object.
|
||||
/// </summary>
|
||||
/// <param name="hitObject">The hit object to apply the state change to.</param>
|
||||
/// <param name="state">The state of the hit object.</param>
|
||||
[Obsolete("Use ApplyNormalVisibilityState() instead.")] // Can be removed 20210506
|
||||
protected virtual void ApplyHiddenState(DrawableHitObject hitObject, ArmedState state)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user