Only additive flash explosions over the epic cutoff

This commit is contained in:
Dean Herbert 2020-10-16 17:24:56 +09:00
parent 77bf050a80
commit a1892aa0a7
1 changed files with 9 additions and 4 deletions

View File

@ -18,6 +18,8 @@ namespace osu.Game.Skinning
{
public class LegacyHealthDisplay : CompositeDrawable, IHealthDisplay
{
private const double epic_cutoff = 0.5;
private readonly Skin skin;
private LegacyHealthPiece fill;
private LegacyHealthPiece marker;
@ -90,7 +92,7 @@ private static Color4 getFillColour(double hp)
if (hp < 0.2)
return Interpolation.ValueAt(0.2 - hp, Color4.Black, Color4.Red, 0, 0.2);
if (hp < 0.5)
if (hp < epic_cutoff)
return Interpolation.ValueAt(0.5 - hp, Color4.White, Color4.Black, 0, 0.5);
return Color4.White;
@ -123,7 +125,7 @@ protected override void LoadComplete()
{
if (hp.NewValue < 0.2f)
Main.Texture = superDangerTexture;
else if (hp.NewValue < 0.5f)
else if (hp.NewValue < epic_cutoff)
Main.Texture = dangerTexture;
else
Main.Texture = normalTexture;
@ -151,7 +153,7 @@ protected override void Update()
base.Update();
Main.Colour = getFillColour(Current.Value);
Main.Blending = Current.Value < 0.5f ? BlendingParameters.Inherit : BlendingParameters.Additive;
Main.Blending = Current.Value < epic_cutoff ? BlendingParameters.Inherit : BlendingParameters.Additive;
}
}
@ -241,8 +243,11 @@ public override void Flash(JudgementResult result)
{
bulgeMain();
bool isEpic = Current.Value >= epic_cutoff;
explode.Blending = isEpic ? BlendingParameters.Additive : BlendingParameters.Inherit;
explode.ScaleTo(1).Then().ScaleTo(isEpic ? 2 : 1.6f, 120);
explode.FadeOutFromOne(120);
explode.ScaleTo(1).Then().ScaleTo(Current.Value > 0.5f ? 2 : 1.6f, 120);
}
private void bulgeMain() =>