mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 10:42:54 +08:00
Make TaikoHitObject store whether the hit object is a finisher.
This commit is contained in:
parent
7d3846692a
commit
768bc2bb5f
@ -3,6 +3,7 @@
|
||||
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.Legacy;
|
||||
using osu.Game.Beatmaps.Samples;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Modes.Objects.Types;
|
||||
using osu.Game.Modes.Taiko.Objects;
|
||||
@ -43,12 +44,15 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
||||
IHasRepeats repeatsData = original as IHasRepeats;
|
||||
IHasEndTime endTimeData = original as IHasEndTime;
|
||||
|
||||
bool isFinisher = (original.Sample.Type & SampleType.Finish) > 0;
|
||||
|
||||
if (distanceData != null)
|
||||
{
|
||||
return new DrumRoll
|
||||
{
|
||||
StartTime = original.StartTime,
|
||||
Sample = original.Sample,
|
||||
IsFinisher = isFinisher,
|
||||
|
||||
Distance = distanceData.Distance * (repeatsData?.RepeatCount ?? 1)
|
||||
};
|
||||
@ -61,6 +65,7 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
||||
{
|
||||
StartTime = original.StartTime,
|
||||
Sample = original.Sample,
|
||||
IsFinisher = isFinisher,
|
||||
|
||||
EndTime = original.StartTime + endTimeData.Duration * bash_convert_factor
|
||||
};
|
||||
@ -70,6 +75,7 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
||||
{
|
||||
StartTime = original.StartTime,
|
||||
Sample = original.Sample,
|
||||
IsFinisher = isFinisher
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,11 @@ namespace osu.Game.Modes.Taiko.Objects
|
||||
/// </summary>
|
||||
public double PreEmpt;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this HitObject is a finisher.
|
||||
/// </summary>
|
||||
public bool IsFinisher;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this HitObject is in Kiai time.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user