mirror of https://github.com/ppy/osu
38 lines
1.1 KiB
C#
38 lines
1.1 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 System;
|
|
using osu.Game.Rulesets.Objects.Types;
|
|
using osu.Game.Rulesets.Judgements;
|
|
using osu.Game.Rulesets.Taiko.Judgements;
|
|
|
|
namespace osu.Game.Rulesets.Taiko.Objects
|
|
{
|
|
public class Swell : TaikoHitObject, IHasEndTime
|
|
{
|
|
public double EndTime => StartTime + Duration;
|
|
|
|
public double Duration { get; set; }
|
|
|
|
/// <summary>
|
|
/// The number of hits required to complete the swell successfully.
|
|
/// </summary>
|
|
public int RequiredHits = 10;
|
|
|
|
public override bool IsStrong
|
|
{
|
|
set => throw new NotSupportedException($"{nameof(Swell)} cannot be a strong hitobject.");
|
|
}
|
|
|
|
protected override void CreateNestedHitObjects()
|
|
{
|
|
base.CreateNestedHitObjects();
|
|
|
|
for (int i = 0; i < RequiredHits; i++)
|
|
AddNested(new SwellTick());
|
|
}
|
|
|
|
public override Judgement CreateJudgement() => new TaikoSwellJudgement();
|
|
}
|
|
}
|