1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-18 11:02:57 +08:00

Remove JudgementResult from Miss/Flash as it is not used

This commit is contained in:
Dean Herbert 2023-10-10 22:10:44 +09:00
parent 4674f63655
commit 682aa06acf
No known key found for this signature in database
4 changed files with 13 additions and 19 deletions

View File

@ -16,7 +16,6 @@ using osu.Framework.Threading;
using osu.Framework.Utils;
using osu.Game.Configuration;
using osu.Game.Graphics;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Skinning;
@ -178,9 +177,9 @@ namespace osu.Game.Screens.Play.HUD
glowBar.Alpha = (float)Interpolation.DampContinuously(glowBar.Alpha, GlowBarValue > 0 ? 1 : 0, 40, Time.Elapsed);
}
protected override void Flash(JudgementResult result)
protected override void Flash()
{
base.Flash(result);
base.Flash();
mainBar.TransformTo(nameof(BarPath.GlowColour), main_bar_glow_colour.Opacity(0.8f))
.TransformTo(nameof(BarPath.GlowColour), main_bar_glow_colour, 300, Easing.OutQuint);
@ -196,9 +195,9 @@ namespace osu.Game.Screens.Play.HUD
}
}
protected override void Miss(JudgementResult result)
protected override void Miss()
{
base.Miss(result);
base.Miss();
if (resetMissBarDelegate != null)
{

View File

@ -8,7 +8,6 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Game.Graphics;
using osu.Game.Rulesets.Judgements;
using osuTK;
using osuTK.Graphics;
using osu.Framework.Graphics.Shapes;
@ -112,7 +111,7 @@ namespace osu.Game.Screens.Play.HUD
};
}
protected override void Flash(JudgementResult result)
protected override void Flash()
{
fill.FadeEdgeEffectTo(Math.Min(1, fill.EdgeEffect.Colour.Linear.A + (1f - base_glow_opacity) / glow_max_hits), 50, Easing.OutQuint)
.Delay(glow_fade_delay)

View File

@ -8,7 +8,6 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Threading;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
@ -41,8 +40,7 @@ namespace osu.Game.Screens.Play.HUD
/// Triggered when a <see cref="Judgement"/> is a successful hit, signaling the health display to perform a flash animation (if designed to do so).
/// Calls to this method are debounced.
/// </summary>
/// <param name="result">The judgement result.</param>
protected virtual void Flash(JudgementResult result)
protected virtual void Flash()
{
}
@ -50,8 +48,7 @@ namespace osu.Game.Screens.Play.HUD
/// Triggered when a <see cref="Judgement"/> resulted in the player losing health.
/// Calls to this method are debounced.
/// </summary>
/// <param name="result">The judgement result.</param>
protected virtual void Miss(JudgementResult result)
protected virtual void Miss()
{
}
@ -94,7 +91,7 @@ namespace osu.Game.Screens.Play.HUD
{
double newValue = Current.Value + 0.05f;
this.TransformBindableTo(Current, newValue, increase_delay);
Scheduler.AddOnce(Flash, new JudgementResult(new HitObject(), new Judgement()));
Scheduler.AddOnce(Flash);
if (newValue >= 1)
finishInitialAnimation();
@ -120,9 +117,9 @@ namespace osu.Game.Screens.Play.HUD
private void onNewJudgement(JudgementResult judgement)
{
if (judgement.IsHit && judgement.Type != HitResult.IgnoreHit)
Scheduler.AddOnce(Flash, judgement);
Scheduler.AddOnce(Flash);
else if (judgement.Judgement.HealthIncreaseFor(judgement) < 0)
Scheduler.AddOnce(Miss, judgement);
Scheduler.AddOnce(Miss);
}
protected override void Dispose(bool isDisposing)

View File

@ -11,7 +11,6 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Framework.Utils;
using osu.Game.Rulesets.Judgements;
using osu.Game.Screens.Play.HUD;
using osu.Game.Utils;
using osuTK;
@ -80,7 +79,7 @@ namespace osu.Game.Skinning
marker.Position = fill.Position + new Vector2(fill.DrawWidth, isNewStyle ? fill.DrawHeight / 2 : 0);
}
protected override void Flash(JudgementResult result) => marker.Flash(result);
protected override void Flash() => marker.Flash();
private static Texture getTexture(ISkin skin, string name) => skin?.GetTexture($"scorebar-{name}");
@ -238,7 +237,7 @@ namespace osu.Game.Skinning
});
}
public override void Flash(JudgementResult result)
public override void Flash()
{
bulgeMain();
@ -257,7 +256,7 @@ namespace osu.Game.Skinning
{
public Bindable<double> Current { get; } = new Bindable<double>();
public virtual void Flash(JudgementResult result)
public virtual void Flash()
{
}
}