1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-18 12:02:57 +08:00
osu-lazer/osu.Game.Rulesets.Taiko/Objects/Swell.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.3 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 17:19:50 +08:00
2022-06-17 15:37:17 +08:00
#nullable disable
using System.Threading;
2017-04-18 15:05:58 +08:00
using osu.Game.Rulesets.Objects.Types;
2018-11-29 23:05:13 +08:00
using osu.Game.Rulesets.Judgements;
2019-09-06 14:24:00 +08:00
using osu.Game.Rulesets.Scoring;
2018-11-29 23:05:13 +08:00
using osu.Game.Rulesets.Taiko.Judgements;
2018-04-13 17:19:50 +08:00
2017-04-18 15:05:58 +08:00
namespace osu.Game.Rulesets.Taiko.Objects
2017-03-17 13:01:32 +08:00
{
2020-05-27 11:38:39 +08:00
public class Swell : TaikoHitObject, IHasDuration
2017-03-17 13:01:32 +08:00
{
2020-02-05 16:12:26 +08:00
public double EndTime
{
get => StartTime + Duration;
set => Duration = value - StartTime;
}
2018-04-13 17:19:50 +08:00
2017-04-05 12:52:53 +08:00
public double Duration { get; set; }
2018-04-13 17:19:50 +08:00
2017-03-17 13:01:32 +08:00
/// <summary>
2017-03-25 19:57:49 +08:00
/// The number of hits required to complete the swell successfully.
2017-03-17 13:01:32 +08:00
/// </summary>
public int RequiredHits = 10;
protected override void CreateNestedHitObjects(CancellationToken cancellationToken)
{
base.CreateNestedHitObjects(cancellationToken);
for (int i = 0; i < RequiredHits; i++)
{
cancellationToken.ThrowIfCancellationRequested();
AddNested(new SwellTick());
}
}
2018-12-06 16:09:42 +08:00
public override Judgement CreateJudgement() => new TaikoSwellJudgement();
2019-10-09 18:08:31 +08:00
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
2017-03-17 13:01:32 +08:00
}
}