1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 00:47:24 +08:00
osu-lazer/osu.Game.Rulesets.Mania/UI/DrawableManiaJudgement.cs

51 lines
1.5 KiB
C#
Raw Normal View History

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
2018-04-13 17:19:50 +08:00
using osu.Framework.Graphics;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Scoring;
2018-04-13 17:19:50 +08:00
namespace osu.Game.Rulesets.Mania.UI
{
2018-05-22 04:24:10 +08:00
public class DrawableManiaJudgement : DrawableJudgement
2018-04-13 17:19:50 +08:00
{
public DrawableManiaJudgement(JudgementResult result, DrawableHitObject judgedObject)
: base(result, judgedObject)
2018-04-13 17:19:50 +08:00
{
}
2020-07-29 15:41:10 +08:00
public DrawableManiaJudgement()
{
}
protected override double FadeInDuration => 50;
2018-04-13 17:19:50 +08:00
protected override void ApplyHitAnimations()
{
JudgementBody.ScaleTo(0.8f);
JudgementBody.ScaleTo(1, 250, Easing.OutElastic);
JudgementBody.Delay(FadeInDuration).ScaleTo(0.75f, 250);
this.Delay(FadeInDuration).FadeOut(200);
2018-04-13 17:19:50 +08:00
}
2020-11-17 14:43:54 +08:00
protected override Drawable CreateDefaultJudgement(HitResult result) => new ManiaJudgementPiece(result);
private class ManiaJudgementPiece : DefaultJudgementPiece
{
2020-11-17 14:43:54 +08:00
public ManiaJudgementPiece(HitResult result)
: base(result)
{
}
protected override void LoadComplete()
{
base.LoadComplete();
2020-11-17 14:43:54 +08:00
JudgementText.Font = JudgementText.Font.With(size: 25);
}
}
2018-04-13 17:19:50 +08:00
}
}