2019-01-24 08:43:03 +00:00
|
|
|
// 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 09:19:50 +00:00
|
|
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Game.Rulesets.Judgements;
|
|
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
2020-11-17 05:59:34 +00:00
|
|
|
using osu.Game.Rulesets.Scoring;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Mania.UI
|
|
|
|
{
|
2018-05-21 20:24:10 +00:00
|
|
|
public class DrawableManiaJudgement : DrawableJudgement
|
2018-04-13 09:19:50 +00:00
|
|
|
{
|
2018-08-02 11:36:54 +00:00
|
|
|
public DrawableManiaJudgement(JudgementResult result, DrawableHitObject judgedObject)
|
|
|
|
: base(result, judgedObject)
|
2018-04-13 09:19:50 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-07-29 07:41:10 +00:00
|
|
|
public DrawableManiaJudgement()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-03-12 10:23:24 +00:00
|
|
|
protected override double FadeInDuration => 50;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2019-03-12 10:41:33 +00:00
|
|
|
protected override void ApplyHitAnimations()
|
2019-03-12 10:23:24 +00:00
|
|
|
{
|
2019-03-12 10:41:33 +00:00
|
|
|
JudgementBody.ScaleTo(0.8f);
|
|
|
|
JudgementBody.ScaleTo(1, 250, Easing.OutElastic);
|
2019-03-12 10:23:24 +00:00
|
|
|
|
2019-03-12 10:41:33 +00:00
|
|
|
JudgementBody.Delay(FadeInDuration).ScaleTo(0.75f, 250);
|
|
|
|
this.Delay(FadeInDuration).FadeOut(200);
|
2018-04-13 09:19:50 +00:00
|
|
|
}
|
2020-11-17 05:59:34 +00:00
|
|
|
|
|
|
|
protected override Drawable CreateDefaultJudgement(HitResult type)
|
|
|
|
=> new ManiaJudgementPiece();
|
|
|
|
|
|
|
|
private class ManiaJudgementPiece : DefaultJudgementPiece
|
|
|
|
{
|
|
|
|
protected override void LoadComplete()
|
|
|
|
{
|
|
|
|
base.LoadComplete();
|
|
|
|
JudgementText.Font = JudgementText.Font.With(size: 25);
|
|
|
|
}
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
}
|
|
|
|
}
|