1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-24 06:07:25 +08:00
osu-lazer/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableBanana.cs

26 lines
784 B
C#
Raw Normal View History

2018-06-10 08:38:17 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK;
using osu.Game.Rulesets.Catch.Judgements;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Catch.Objects.Drawable
{
public class DrawableBanana : DrawableFruit
{
public DrawableBanana(BananaShower.Banana h)
: base(h)
{
}
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
{
if (CheckPosition == null) return;
if (timeOffset >= 0)
AddJudgement(new CatchBananaJudgement { Result = CheckPosition.Invoke(HitObject) ? HitResult.Perfect : HitResult.Miss });
}
}
}