// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; using osu.Game.Rulesets.Difficulty.Preprocessing; using osu.Game.Beatmaps; using osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour; namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing { public class TaikoDifficultyPreprocessor { /// /// Creates a list of s from a s. /// This is placed here in a separate class to avoid having to know /// too much implementation details of the preprocessing, and avoid /// having circular dependencies with various preprocessing and evaluator classes. /// /// The beatmap from which the list of is created. /// The rate at which the gameplay clock is run at. public static List CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate) { List difficultyHitObjects = new List(); List centreObjects = new List(); List rimObjects = new List(); List noteObjects = new List(); for (int i = 2; i < beatmap.HitObjects.Count; i++) { difficultyHitObjects.Add( new TaikoDifficultyHitObject( beatmap.HitObjects[i], beatmap.HitObjects[i - 1], beatmap.HitObjects[i - 2], clockRate, difficultyHitObjects, centreObjects, rimObjects, noteObjects, difficultyHitObjects.Count) ); } TaikoColourDifficultyPreprocessor.ProcessAndAssign(difficultyHitObjects); return difficultyHitObjects; } } }