mirror of
https://github.com/ppy/osu.git
synced 2024-11-12 13:17:26 +08:00
44 lines
1.2 KiB
C#
44 lines
1.2 KiB
C#
// 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.
|
|
|
|
using osu.Framework.Allocation;
|
|
using osu.Framework.Graphics;
|
|
using osu.Game.Rulesets.Judgements;
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
|
|
|
namespace osu.Game.Rulesets.Mania.UI
|
|
{
|
|
public class DrawableManiaJudgement : DrawableJudgement
|
|
{
|
|
public DrawableManiaJudgement(JudgementResult result, DrawableHitObject judgedObject)
|
|
: base(result, judgedObject)
|
|
{
|
|
}
|
|
|
|
[BackgroundDependencyLoader]
|
|
private void load()
|
|
{
|
|
if (JudgementText != null)
|
|
JudgementText.TextSize = 25;
|
|
}
|
|
|
|
protected override void LoadComplete()
|
|
{
|
|
base.LoadComplete();
|
|
|
|
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();
|
|
}
|
|
}
|
|
}
|