1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 12:07:23 +08:00
osu-lazer/osu.Game.Rulesets.Taiko/Objects/Swell.cs

35 lines
1.1 KiB
C#
Raw Normal View History

2018-04-13 17:19:50 +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 System;
2018-04-13 17:19:50 +08:00
using osu.Game.Rulesets.Objects.Types;
2018-11-29 23:05:13 +08:00
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Taiko.Judgements;
2018-04-13 17:19:50 +08:00
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());
}
2018-12-06 16:09:42 +08:00
public override Judgement CreateJudgement() => new TaikoSwellJudgement();
2018-04-13 17:19:50 +08:00
}
}