mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 23:27:34 +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);
|
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);
|
JudgementBody.Delay(FadeInDuration).ScaleTo(0.75f, 250);
|
||||||
|
this.Delay(FadeInDuration).FadeOut(200);
|
||||||
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();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@ using osu.Framework.Graphics;
|
|||||||
using osuTK;
|
using osuTK;
|
||||||
using osu.Game.Rulesets.Judgements;
|
using osu.Game.Rulesets.Judgements;
|
||||||
using osu.Game.Rulesets.Objects.Drawables;
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Scoring;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
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);
|
||||||
JudgementText?.TransformSpacingTo(new Vector2(14, 0), 1800, Easing.OutQuint);
|
base.ApplyHitAnimations();
|
||||||
|
|
||||||
base.LoadComplete();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
this.MoveToY(-100, 500);
|
base.ApplyHitAnimations();
|
||||||
|
|
||||||
base.LoadComplete();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,12 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
protected Container JudgementBody;
|
protected Container JudgementBody;
|
||||||
protected SpriteText JudgementText;
|
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>
|
/// <summary>
|
||||||
/// Creates a drawable which visualises a <see cref="Judgements.Judgement"/>.
|
/// Creates a drawable which visualises a <see cref="Judgements.Judgement"/>.
|
||||||
/// </summary>
|
/// </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()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
this.FadeInFromZero(100, Easing.OutQuint);
|
this.FadeInFromZero(FadeInDuration, Easing.OutQuint);
|
||||||
|
|
||||||
switch (Result.Type)
|
switch (Result.Type)
|
||||||
{
|
{
|
||||||
@ -85,10 +99,7 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
this.Delay(600).FadeOut(200);
|
this.Delay(600).FadeOut(200);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
JudgementBody.ScaleTo(0.9f);
|
ApplyHitAnimations();
|
||||||
JudgementBody.ScaleTo(1, 500, Easing.OutElastic);
|
|
||||||
|
|
||||||
this.Delay(100).FadeOut(400);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user