2023-06-23 00:37:25 +08:00
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2019-01-24 16:43:03 +08:00
// See the LICENCE file in the repository root for full licence text.
2018-08-03 15:11:57 +08:00
2023-07-15 23:33:16 +08:00
using osu.Game.Rulesets.Objects ;
2018-08-03 15:56:46 +08:00
using osu.Game.Rulesets.Taiko.Judgements ;
2018-08-03 15:11:57 +08:00
namespace osu.Game.Rulesets.Taiko.Objects.Drawables
{
2018-08-03 15:56:46 +08:00
/// <summary>
2020-12-15 04:47:31 +08:00
/// Used as a nested hitobject to provide <see cref="TaikoStrongJudgement"/>s for <see cref="DrawableTaikoStrongableHitObject{TObject,TStrongNestedObject}"/>s.
2018-08-03 15:56:46 +08:00
/// </summary>
2022-11-24 13:32:20 +08:00
public abstract partial class DrawableStrongNestedHit : DrawableTaikoHitObject
2018-08-03 15:11:57 +08:00
{
2023-06-23 23:59:36 +08:00
public new DrawableTaikoHitObject ? ParentHitObject = > base . ParentHitObject as DrawableTaikoHitObject ;
2018-08-03 15:46:03 +08:00
2023-06-23 23:59:36 +08:00
protected DrawableStrongNestedHit ( StrongNestedHitObject ? nestedHit )
2020-12-13 19:18:29 +08:00
: base ( nestedHit )
2018-08-03 15:11:57 +08:00
{
}
2023-07-15 21:24:40 +08:00
public override void OnKilled ( )
{
base . OnKilled ( ) ;
2023-07-15 23:33:16 +08:00
if ( ! Judged & & Time . Current > ParentHitObject ? . HitObject . GetEndTime ( ) )
2023-07-15 21:24:40 +08:00
ApplyResult ( r = > r . Type = r . Judgement . MinResult ) ;
}
2018-08-03 15:11:57 +08:00
}
}