1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 23:47:25 +08:00
osu-lazer/osu.Game.Rulesets.Taiko/Difficulty/Preprocessing/Colour/Data/MonoStreak.cs

47 lines
1.9 KiB
C#
Raw Normal View History

2022-07-15 19:07:01 +08:00
// 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.
using osu.Game.Rulesets.Difficulty.Preprocessing;
using osu.Game.Rulesets.Taiko.Objects;
using System.Collections.Generic;
2022-07-15 19:07:01 +08:00
namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
{
/// <summary>
/// Encode colour information for a sequence of <see cref="TaikoDifficultyHitObject"/>s. Consecutive <see cref="TaikoDifficultyHitObject"/>s
2022-08-19 16:05:34 +08:00
/// of the same <see cref="Objects.HitType"/> are encoded within the same <see cref="MonoStreak"/>.
/// </summary>
2022-08-19 15:31:03 +08:00
public class MonoStreak
{
/// <summary>
2022-08-19 15:31:03 +08:00
/// List of <see cref="DifficultyHitObject"/>s that are encoded within this <see cref="MonoStreak"/>.
/// </summary>
2022-08-19 15:45:43 +08:00
public List<TaikoDifficultyHitObject> HitObjects { get; private set; } = new List<TaikoDifficultyHitObject>();
2022-07-22 18:20:35 +08:00
/// <summary>
2022-08-19 15:31:03 +08:00
/// The parent <see cref="AlternatingMonoPattern"/> that contains this <see cref="MonoStreak"/>
2022-07-22 18:20:35 +08:00
/// </summary>
2022-08-24 08:57:13 +08:00
public AlternatingMonoPattern Parent = null!;
/// <summary>
2022-08-19 15:45:43 +08:00
/// Index of this <see cref="MonoStreak"/> within it's parent <see cref="AlternatingMonoPattern"/>
/// </summary>
public int Index;
/// <summary>
/// The first <see cref="TaikoDifficultyHitObject"/> in this <see cref="MonoStreak"/>.
/// </summary>
public TaikoDifficultyHitObject FirstHitObject => HitObjects[0];
/// <summary>
/// The hit type of all objects encoded within this <see cref="MonoStreak"/>
/// </summary>
2022-08-19 16:05:34 +08:00
public HitType? HitType => (HitObjects[0].BaseObject as Hit)?.Type;
2022-07-22 10:49:53 +08:00
/// <summary>
/// How long the mono pattern encoded within is
/// </summary>
2022-08-19 15:45:43 +08:00
public int RunLength => HitObjects.Count;
}
2022-07-15 19:07:01 +08:00
}