1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:07:52 +08:00

Refactor previous and next colour change into TaikoDifficultyHitObjectColour

This commit is contained in:
vun 2022-09-30 11:42:48 +08:00
parent 09a38fec94
commit 02092ede64
2 changed files with 12 additions and 2 deletions

View File

@ -31,8 +31,8 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Evaluators
/// </summary>
private static int availableFingersFor(TaikoDifficultyHitObject hitObject)
{
DifficultyHitObject? previousColourChange = hitObject.Colour.MonoStreak?.FirstHitObject.Previous(0);
DifficultyHitObject? nextColourChange = hitObject.Colour.MonoStreak?.LastHitObject.Next(0);
DifficultyHitObject? previousColourChange = hitObject.Colour.PreviousColourChange;
DifficultyHitObject? nextColourChange = hitObject.Colour.NextColourChange;
if (previousColourChange != null && hitObject.StartTime - previousColourChange.StartTime < 300)
{

View File

@ -24,5 +24,15 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour
/// The <see cref="RepeatingHitPattern"/> that encodes this note.
/// </summary>
public RepeatingHitPatterns? RepeatingHitPattern;
/// <summary>
/// The closest past <see cref="TaikoDifficultyHitObject"/> that's not the same colour.
/// </summary>
public TaikoDifficultyHitObject? PreviousColourChange => MonoStreak?.FirstHitObject.PreviousNote(0);
/// <summary>
/// The closest future <see cref="TaikoDifficultyHitObject"/> that's not the same colour.
/// </summary>
public TaikoDifficultyHitObject? NextColourChange => MonoStreak?.LastHitObject.NextNote(0);
}
}