mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 22:27:25 +08:00
Merge branch 'master' into prevent-null-lookup
This commit is contained in:
commit
7fc8e07f12
@ -22,22 +22,15 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
JudgementText.Font = JudgementText.Font.With(size: 25);
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
protected override double FadeInDuration => 50;
|
||||
|
||||
protected override void ApplyHitAnimations()
|
||||
{
|
||||
base.LoadComplete();
|
||||
JudgementBody.ScaleTo(0.8f);
|
||||
JudgementBody.ScaleTo(1, 250, Easing.OutElastic);
|
||||
|
||||
this.FadeInFromZero(50, Easing.OutQuint);
|
||||
|
||||
if (Result.IsHit)
|
||||
{
|
||||
JudgementBody.ScaleTo(0.8f);
|
||||
JudgementBody.ScaleTo(1, 250, Easing.OutElastic);
|
||||
|
||||
JudgementBody.Delay(50).ScaleTo(0.75f, 250);
|
||||
this.Delay(50).FadeOut(200);
|
||||
}
|
||||
|
||||
Expire();
|
||||
JudgementBody.Delay(FadeInDuration).ScaleTo(0.75f, 250);
|
||||
this.Delay(FadeInDuration).FadeOut(200);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ using osu.Framework.Graphics;
|
||||
using osuTK;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
{
|
||||
@ -16,12 +15,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
{
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
protected override void ApplyHitAnimations()
|
||||
{
|
||||
if (Result.Type != HitResult.Miss)
|
||||
JudgementText?.TransformSpacingTo(new Vector2(14, 0), 1800, Easing.OutQuint);
|
||||
|
||||
base.LoadComplete();
|
||||
JudgementText?.TransformSpacingTo(new Vector2(14, 0), 1800, Easing.OutQuint);
|
||||
base.ApplyHitAnimations();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,12 +39,10 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
}
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
protected override void ApplyHitAnimations()
|
||||
{
|
||||
if (Result.IsHit)
|
||||
this.MoveToY(-100, 500);
|
||||
|
||||
base.LoadComplete();
|
||||
this.MoveToY(-100, 500);
|
||||
base.ApplyHitAnimations();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,12 @@ namespace osu.Game.Rulesets.Judgements
|
||||
protected Container JudgementBody;
|
||||
protected SpriteText JudgementText;
|
||||
|
||||
/// <summary>
|
||||
/// Duration of initial fade in.
|
||||
/// Default fade out will start immediately after this duration.
|
||||
/// </summary>
|
||||
protected virtual double FadeInDuration => 100;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a drawable which visualises a <see cref="Judgements.Judgement"/>.
|
||||
/// </summary>
|
||||
@ -65,11 +71,19 @@ namespace osu.Game.Rulesets.Judgements
|
||||
};
|
||||
}
|
||||
|
||||
protected virtual void ApplyHitAnimations()
|
||||
{
|
||||
JudgementBody.ScaleTo(0.9f);
|
||||
JudgementBody.ScaleTo(1, 500, Easing.OutElastic);
|
||||
|
||||
this.Delay(FadeInDuration).FadeOut(400);
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
this.FadeInFromZero(100, Easing.OutQuint);
|
||||
this.FadeInFromZero(FadeInDuration, Easing.OutQuint);
|
||||
|
||||
switch (Result.Type)
|
||||
{
|
||||
@ -85,10 +99,7 @@ namespace osu.Game.Rulesets.Judgements
|
||||
this.Delay(600).FadeOut(200);
|
||||
break;
|
||||
default:
|
||||
JudgementBody.ScaleTo(0.9f);
|
||||
JudgementBody.ScaleTo(1, 500, Easing.OutElastic);
|
||||
|
||||
this.Delay(100).FadeOut(400);
|
||||
ApplyHitAnimations();
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user