mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 19:04:06 +08:00
Merge pull request #25951 from peppy/show-tick-results
Show slider tick / slider end misses with a visible judgement
This commit is contained in:
commit
53cca61e61
@ -34,8 +34,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
|
|
||||||
private Drawable scaleContainer;
|
private Drawable scaleContainer;
|
||||||
|
|
||||||
public override bool DisplayResult => false;
|
|
||||||
|
|
||||||
public DrawableSliderRepeat()
|
public DrawableSliderRepeat()
|
||||||
: base(null)
|
: base(null)
|
||||||
{
|
{
|
||||||
|
@ -24,11 +24,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
|
|
||||||
protected DrawableSlider DrawableSlider => (DrawableSlider)ParentHitObject;
|
protected DrawableSlider DrawableSlider => (DrawableSlider)ParentHitObject;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The judgement text is provided by the <see cref="DrawableSlider"/>.
|
|
||||||
/// </summary>
|
|
||||||
public override bool DisplayResult => false;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether the hit samples only play on successful hits.
|
/// Whether the hit samples only play on successful hits.
|
||||||
/// If <c>false</c>, the hit samples will also play on misses.
|
/// If <c>false</c>, the hit samples will also play on misses.
|
||||||
|
@ -20,8 +20,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
|
|
||||||
private const float default_tick_size = 16;
|
private const float default_tick_size = 16;
|
||||||
|
|
||||||
public override bool DisplayResult => false;
|
|
||||||
|
|
||||||
protected DrawableSlider DrawableSlider => (DrawableSlider)ParentHitObject;
|
protected DrawableSlider DrawableSlider => (DrawableSlider)ParentHitObject;
|
||||||
|
|
||||||
private SkinnableDrawable scaleContainer;
|
private SkinnableDrawable scaleContainer;
|
||||||
|
@ -62,25 +62,23 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public virtual void PlayAnimation()
|
public virtual void PlayAnimation()
|
||||||
{
|
{
|
||||||
switch (Result)
|
if (Result.IsMiss())
|
||||||
{
|
{
|
||||||
default:
|
this.ScaleTo(1.6f);
|
||||||
JudgementText
|
this.ScaleTo(1, 100, Easing.In);
|
||||||
.FadeInFromZero(300, Easing.OutQuint)
|
|
||||||
.ScaleTo(Vector2.One)
|
|
||||||
.ScaleTo(new Vector2(1.2f), 1800, Easing.OutQuint);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case HitResult.Miss:
|
this.MoveTo(Vector2.Zero);
|
||||||
this.ScaleTo(1.6f);
|
this.MoveToOffset(new Vector2(0, 100), 800, Easing.InQuint);
|
||||||
this.ScaleTo(1, 100, Easing.In);
|
|
||||||
|
|
||||||
this.MoveTo(Vector2.Zero);
|
this.RotateTo(0);
|
||||||
this.MoveToOffset(new Vector2(0, 100), 800, Easing.InQuint);
|
this.RotateTo(40, 800, Easing.InQuint);
|
||||||
|
}
|
||||||
this.RotateTo(0);
|
else
|
||||||
this.RotateTo(40, 800, Easing.InQuint);
|
{
|
||||||
break;
|
JudgementText
|
||||||
|
.FadeInFromZero(300, Easing.OutQuint)
|
||||||
|
.ScaleTo(Vector2.One)
|
||||||
|
.ScaleTo(new Vector2(1.2f), 1800, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.FadeOutFromOne(800);
|
this.FadeOutFromOne(800);
|
||||||
|
@ -20,7 +20,6 @@ using osu.Game.Rulesets.Osu.Configuration;
|
|||||||
using osu.Game.Rulesets.Osu.Objects;
|
using osu.Game.Rulesets.Osu.Objects;
|
||||||
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Osu.Objects.Drawables.Connections;
|
using osu.Game.Rulesets.Osu.Objects.Drawables.Connections;
|
||||||
using osu.Game.Rulesets.Osu.Scoring;
|
|
||||||
using osu.Game.Rulesets.Osu.UI.Cursor;
|
using osu.Game.Rulesets.Osu.UI.Cursor;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
@ -66,8 +65,21 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
|
|
||||||
HitPolicy = new StartTimeOrderedHitPolicy();
|
HitPolicy = new StartTimeOrderedHitPolicy();
|
||||||
|
|
||||||
var hitWindows = new OsuHitWindows();
|
foreach (var result in Enum.GetValues<HitResult>().Where(r =>
|
||||||
foreach (var result in Enum.GetValues<HitResult>().Where(r => r > HitResult.None && hitWindows.IsHitResultAllowed(r)))
|
{
|
||||||
|
switch (r)
|
||||||
|
{
|
||||||
|
case HitResult.Great:
|
||||||
|
case HitResult.Ok:
|
||||||
|
case HitResult.Meh:
|
||||||
|
case HitResult.Miss:
|
||||||
|
case HitResult.LargeTickMiss:
|
||||||
|
case HitResult.IgnoreMiss:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}))
|
||||||
poolDictionary.Add(result, new DrawableJudgementPool(result, onJudgementLoaded));
|
poolDictionary.Add(result, new DrawableJudgementPool(result, onJudgementLoaded));
|
||||||
|
|
||||||
AddRangeInternal(poolDictionary.Values);
|
AddRangeInternal(poolDictionary.Values);
|
||||||
@ -170,7 +182,10 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
if (!judgedObject.DisplayResult || !DisplayJudgements.Value)
|
if (!judgedObject.DisplayResult || !DisplayJudgements.Value)
|
||||||
return;
|
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);
|
judgementLayer.Add(explosion);
|
||||||
|
|
||||||
|
@ -75,9 +75,12 @@ namespace osu.Game.Graphics
|
|||||||
{
|
{
|
||||||
switch (result)
|
switch (result)
|
||||||
{
|
{
|
||||||
|
case HitResult.IgnoreMiss:
|
||||||
case HitResult.SmallTickMiss:
|
case HitResult.SmallTickMiss:
|
||||||
case HitResult.LargeTickMiss:
|
return Orange1;
|
||||||
|
|
||||||
case HitResult.Miss:
|
case HitResult.Miss:
|
||||||
|
case HitResult.LargeTickMiss:
|
||||||
case HitResult.ComboBreak:
|
case HitResult.ComboBreak:
|
||||||
return Red;
|
return Red;
|
||||||
|
|
||||||
|
@ -38,18 +38,16 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public virtual void PlayAnimation()
|
public virtual void PlayAnimation()
|
||||||
{
|
{
|
||||||
switch (Result)
|
if (Result != HitResult.None && !Result.IsHit())
|
||||||
{
|
{
|
||||||
case HitResult.Miss:
|
this.ScaleTo(1.6f);
|
||||||
this.ScaleTo(1.6f);
|
this.ScaleTo(1, 100, Easing.In);
|
||||||
this.ScaleTo(1, 100, Easing.In);
|
|
||||||
|
|
||||||
this.MoveTo(Vector2.Zero);
|
this.MoveTo(Vector2.Zero);
|
||||||
this.MoveToOffset(new Vector2(0, 100), 800, Easing.InQuint);
|
this.MoveToOffset(new Vector2(0, 100), 800, Easing.InQuint);
|
||||||
|
|
||||||
this.RotateTo(0);
|
this.RotateTo(0);
|
||||||
this.RotateTo(40, 800, Easing.InQuint);
|
this.RotateTo(40, 800, Easing.InQuint);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.FadeOutFromOne(800);
|
this.FadeOutFromOne(800);
|
||||||
|
@ -133,12 +133,11 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
case HitResult.None:
|
case HitResult.None:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HitResult.Miss:
|
|
||||||
ApplyMissAnimations();
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ApplyHitAnimations();
|
if (Result.Type.IsHit())
|
||||||
|
ApplyHitAnimations();
|
||||||
|
else
|
||||||
|
ApplyMissAnimations();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,6 +86,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
/// Indicates a large tick miss.
|
/// Indicates a large tick miss.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[EnumMember(Value = "large_tick_miss")]
|
[EnumMember(Value = "large_tick_miss")]
|
||||||
|
[Description(@"x")]
|
||||||
[Order(10)]
|
[Order(10)]
|
||||||
LargeTickMiss,
|
LargeTickMiss,
|
||||||
|
|
||||||
@ -117,6 +118,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
/// Indicates a miss that should be ignored for scoring purposes.
|
/// Indicates a miss that should be ignored for scoring purposes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[EnumMember(Value = "ignore_miss")]
|
[EnumMember(Value = "ignore_miss")]
|
||||||
|
[Description("x")]
|
||||||
[Order(13)]
|
[Order(13)]
|
||||||
IgnoreMiss,
|
IgnoreMiss,
|
||||||
|
|
||||||
@ -267,9 +269,34 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether a <see cref="HitResult"/> represents a miss of any type.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Of note, both <see cref="IsMiss"/> and <see cref="IsHit"/> return <see langword="false"/> for <see cref="HitResult.None"/>.
|
||||||
|
/// </remarks>
|
||||||
|
public static bool IsMiss(this HitResult result)
|
||||||
|
{
|
||||||
|
switch (result)
|
||||||
|
{
|
||||||
|
case HitResult.IgnoreMiss:
|
||||||
|
case HitResult.Miss:
|
||||||
|
case HitResult.SmallTickMiss:
|
||||||
|
case HitResult.LargeTickMiss:
|
||||||
|
case HitResult.ComboBreak:
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether a <see cref="HitResult"/> represents a successful hit.
|
/// Whether a <see cref="HitResult"/> represents a successful hit.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Of note, both <see cref="IsMiss"/> and <see cref="IsHit"/> return <see langword="false"/> for <see cref="HitResult.None"/>.
|
||||||
|
/// </remarks>
|
||||||
public static bool IsHit(this HitResult result)
|
public static bool IsHit(this HitResult result)
|
||||||
{
|
{
|
||||||
switch (result)
|
switch (result)
|
||||||
|
@ -50,7 +50,7 @@ namespace osu.Game.Skinning
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result != HitResult.Miss)
|
if (!result.IsMiss())
|
||||||
{
|
{
|
||||||
//new judgement shows old as a temporary effect
|
//new judgement shows old as a temporary effect
|
||||||
AddInternal(temporaryOldStyle = new LegacyJudgementPieceOld(result, createMainDrawable, 1.05f, true)
|
AddInternal(temporaryOldStyle = new LegacyJudgementPieceOld(result, createMainDrawable, 1.05f, true)
|
||||||
|
@ -52,9 +52,17 @@ namespace osu.Game.Skinning
|
|||||||
if (animation?.FrameCount > 1 && !forceTransforms)
|
if (animation?.FrameCount > 1 && !forceTransforms)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (result)
|
if (result.IsMiss())
|
||||||
{
|
{
|
||||||
case HitResult.Miss:
|
bool isTick = result != HitResult.Miss;
|
||||||
|
|
||||||
|
if (isTick)
|
||||||
|
{
|
||||||
|
this.ScaleTo(0.6f);
|
||||||
|
this.ScaleTo(0.3f, 100, Easing.In);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
this.ScaleTo(1.6f);
|
this.ScaleTo(1.6f);
|
||||||
this.ScaleTo(1, 100, Easing.In);
|
this.ScaleTo(1, 100, Easing.In);
|
||||||
|
|
||||||
@ -71,20 +79,19 @@ namespace osu.Game.Skinning
|
|||||||
this.RotateTo(0);
|
this.RotateTo(0);
|
||||||
this.RotateTo(rotation, fade_in_length)
|
this.RotateTo(rotation, fade_in_length)
|
||||||
.Then().RotateTo(rotation * 2, fade_out_delay + fade_out_length - fade_in_length, Easing.In);
|
.Then().RotateTo(rotation * 2, fade_out_delay + fade_out_length - fade_in_length, Easing.In);
|
||||||
break;
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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
|
||||||
|
|
||||||
default:
|
// 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
|
||||||
this.ScaleTo(0.6f).Then()
|
// second half of the transform.
|
||||||
.ScaleTo(1.1f, fade_in_length * 0.8f).Then() // t = 0.8
|
.ScaleTo(0.95f).ScaleTo(finalScale, fade_in_length * 0.2f); // t = 1.4
|
||||||
.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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -453,11 +453,11 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
private Drawable? getJudgementAnimation(HitResult result)
|
private Drawable? getJudgementAnimation(HitResult result)
|
||||||
{
|
{
|
||||||
|
if (result.IsMiss())
|
||||||
|
return this.GetAnimation("hit0", true, false);
|
||||||
|
|
||||||
switch (result)
|
switch (result)
|
||||||
{
|
{
|
||||||
case HitResult.Miss:
|
|
||||||
return this.GetAnimation("hit0", true, false);
|
|
||||||
|
|
||||||
case HitResult.Meh:
|
case HitResult.Meh:
|
||||||
return this.GetAnimation("hit50", true, false);
|
return this.GetAnimation("hit50", true, false);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user