1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 09:03:01 +08:00

Add support for showing tick misses

This commit is contained in:
Dean Herbert 2023-12-20 20:23:19 +09:00
parent 22513e0070
commit 9b383e3276
No known key found for this signature in database
13 changed files with 62 additions and 72 deletions

View File

@ -34,8 +34,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
private Drawable scaleContainer;
public override bool DisplayResult => false;
public DrawableSliderRepeat()
: base(null)
{

View File

@ -24,11 +24,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
protected DrawableSlider DrawableSlider => (DrawableSlider)ParentHitObject;
/// <summary>
/// The judgement text is provided by the <see cref="DrawableSlider"/>.
/// </summary>
public override bool DisplayResult => false;
/// <summary>
/// Whether the hit samples only play on successful hits.
/// If <c>false</c>, the hit samples will also play on misses.

View File

@ -20,8 +20,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
private const float default_tick_size = 16;
public override bool DisplayResult => false;
protected DrawableSlider DrawableSlider => (DrawableSlider)ParentHitObject;
private SkinnableDrawable scaleContainer;

View File

@ -28,6 +28,8 @@ namespace osu.Game.Rulesets.Osu.Scoring
case HitResult.Ok:
case HitResult.Meh:
case HitResult.Miss:
case HitResult.LargeTickMiss:
case HitResult.IgnoreMiss:
return true;
}

View File

@ -62,16 +62,15 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
/// </remarks>
public virtual void PlayAnimation()
{
switch (Result)
if (Result.IsHit())
{
default:
JudgementText
.FadeInFromZero(300, Easing.OutQuint)
.ScaleTo(Vector2.One)
.ScaleTo(new Vector2(1.2f), 1800, Easing.OutQuint);
break;
case HitResult.Miss:
}
else
{
this.ScaleTo(1.6f);
this.ScaleTo(1, 100, Easing.In);
@ -80,7 +79,6 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
this.RotateTo(0);
this.RotateTo(40, 800, Easing.InQuint);
break;
}
this.FadeOutFromOne(800);

View File

@ -170,7 +170,10 @@ namespace osu.Game.Rulesets.Osu.UI
if (!judgedObject.DisplayResult || !DisplayJudgements.Value)
return;
DrawableOsuJudgement explosion = poolDictionary[result.Type].Get(doj => doj.Apply(result, judgedObject));
if (!poolDictionary.TryGetValue(result.Type, out var pool))
return;
DrawableOsuJudgement explosion = pool.Get(doj => doj.Apply(result, judgedObject));
judgementLayer.Add(explosion);

View File

@ -77,6 +77,7 @@ namespace osu.Game.Graphics
{
case HitResult.SmallTickMiss:
case HitResult.LargeTickMiss:
case HitResult.IgnoreMiss:
case HitResult.Miss:
case HitResult.ComboBreak:
return Red;

View File

@ -38,9 +38,8 @@ namespace osu.Game.Rulesets.Judgements
/// </remarks>
public virtual void PlayAnimation()
{
switch (Result)
if (Result != HitResult.None && !Result.IsHit())
{
case HitResult.Miss:
this.ScaleTo(1.6f);
this.ScaleTo(1, 100, Easing.In);
@ -49,7 +48,6 @@ namespace osu.Game.Rulesets.Judgements
this.RotateTo(0);
this.RotateTo(40, 800, Easing.InQuint);
break;
}
this.FadeOutFromOne(800);

View File

@ -133,12 +133,11 @@ namespace osu.Game.Rulesets.Judgements
case HitResult.None:
break;
case HitResult.Miss:
ApplyMissAnimations();
break;
default:
if (Result.Type.IsHit())
ApplyHitAnimations();
else
ApplyMissAnimations();
break;
}

View File

@ -86,6 +86,7 @@ namespace osu.Game.Rulesets.Scoring
/// Indicates a large tick miss.
/// </summary>
[EnumMember(Value = "large_tick_miss")]
[Description(@"x")]
[Order(10)]
LargeTickMiss,
@ -117,6 +118,7 @@ namespace osu.Game.Rulesets.Scoring
/// Indicates a miss that should be ignored for scoring purposes.
/// </summary>
[EnumMember(Value = "ignore_miss")]
[Description("x")]
[Order(13)]
IgnoreMiss,

View File

@ -50,7 +50,7 @@ namespace osu.Game.Skinning
});
}
if (result != HitResult.Miss)
if (result.IsHit())
{
//new judgement shows old as a temporary effect
AddInternal(temporaryOldStyle = new LegacyJudgementPieceOld(result, createMainDrawable, 1.05f, true)

View File

@ -52,9 +52,19 @@ namespace osu.Game.Skinning
if (animation?.FrameCount > 1 && !forceTransforms)
return;
switch (result)
if (result.IsHit())
{
this.ScaleTo(0.6f).Then()
.ScaleTo(1.1f, fade_in_length * 0.8f).Then() // t = 0.8
.Delay(fade_in_length * 0.2f) // t = 1.0
.ScaleTo(0.9f, fade_in_length * 0.2f).Then() // t = 1.2
// stable dictates scale of 0.9->1 over time 1.0 to 1.4, but we are already at 1.2.
// so we need to force the current value to be correct at 1.2 (0.95) then complete the
// second half of the transform.
.ScaleTo(0.95f).ScaleTo(finalScale, fade_in_length * 0.2f); // t = 1.4
}
else
{
case HitResult.Miss:
this.ScaleTo(1.6f);
this.ScaleTo(1, 100, Easing.In);
@ -71,20 +81,6 @@ namespace osu.Game.Skinning
this.RotateTo(0);
this.RotateTo(rotation, fade_in_length)
.Then().RotateTo(rotation * 2, fade_out_delay + fade_out_length - fade_in_length, Easing.In);
break;
default:
this.ScaleTo(0.6f).Then()
.ScaleTo(1.1f, fade_in_length * 0.8f).Then() // t = 0.8
.Delay(fade_in_length * 0.2f) // t = 1.0
.ScaleTo(0.9f, fade_in_length * 0.2f).Then() // t = 1.2
// stable dictates scale of 0.9->1 over time 1.0 to 1.4, but we are already at 1.2.
// so we need to force the current value to be correct at 1.2 (0.95) then complete the
// second half of the transform.
.ScaleTo(0.95f).ScaleTo(finalScale, fade_in_length * 0.2f); // t = 1.4
break;
}
}

View File

@ -453,11 +453,11 @@ namespace osu.Game.Skinning
private Drawable? getJudgementAnimation(HitResult result)
{
switch (result)
{
case HitResult.Miss:
if (!result.IsHit())
return this.GetAnimation("hit0", true, false);
switch (result)
{
case HitResult.Meh:
return this.GetAnimation("hit50", true, false);