osu/osu.Game.Rulesets.Mania/UI/DrawableManiaJudgement.cs

42 lines
1.2 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 09:19:50 +00:00
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
{
2018-05-21 20:24:10 +00:00
public class DrawableManiaJudgement : DrawableJudgement
2018-04-13 09:19:50 +00:00
{
public DrawableManiaJudgement(JudgementResult result, DrawableHitObject judgedObject)
: base(result, judgedObject)
2018-04-13 09:19:50 +00:00
{
}
[BackgroundDependencyLoader]
private void load()
{
if (JudgementText != null)
JudgementText.Font = JudgementText.Font.With(size: 25);
2018-04-13 09:19:50 +00:00
}
protected override double FadeInDuration => 50;
2018-04-13 09:19:50 +00:00
protected override float InitialHitScale => 0.8f;
2018-04-13 09:19:50 +00:00
protected override double HitFadeOutDuration => 200;
2018-04-13 09:19:50 +00:00
protected override float HitScaleDuration => 250;
2018-04-13 09:19:50 +00:00
protected override void LoadComplete()
{
if (Result.IsHit)
JudgementBody.Delay(FadeInDuration).ScaleTo(0.75f, HitScaleDuration);
base.LoadComplete();
2018-04-13 09:19:50 +00:00
}
}
}