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.
|
|
|
|
|
2022-07-05 14:41:40 +08:00
|
|
|
using osu.Game.Rulesets.Difficulty.Preprocessing;
|
2022-07-14 16:29:23 +08:00
|
|
|
using osu.Game.Rulesets.Taiko.Objects;
|
2022-07-05 14:41:40 +08:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
2022-07-15 19:07:01 +08:00
|
|
|
namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
|
2022-07-05 14:41:40 +08:00
|
|
|
{
|
2022-07-14 16:29:23 +08:00
|
|
|
/// <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"/>.
|
2022-07-14 16:29:23 +08:00
|
|
|
/// </summary>
|
2022-08-19 15:31:03 +08:00
|
|
|
public class MonoStreak
|
2022-07-05 14:41:40 +08:00
|
|
|
{
|
2022-07-14 16:29:23 +08:00
|
|
|
/// <summary>
|
2022-08-19 15:31:03 +08:00
|
|
|
/// List of <see cref="DifficultyHitObject"/>s that are encoded within this <see cref="MonoStreak"/>.
|
2022-07-14 16:29:23 +08:00
|
|
|
/// </summary>
|
2022-08-19 15:45:43 +08:00
|
|
|
public List<TaikoDifficultyHitObject> HitObjects { get; private set; } = new List<TaikoDifficultyHitObject>();
|
2022-07-05 14:41:40 +08:00
|
|
|
|
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!;
|
2022-07-21 19:15:22 +08:00
|
|
|
|
|
|
|
/// <summary>
|
2022-08-19 15:45:43 +08:00
|
|
|
/// Index of this <see cref="MonoStreak"/> within it's parent <see cref="AlternatingMonoPattern"/>
|
2022-07-21 19:15:22 +08:00
|
|
|
/// </summary>
|
|
|
|
public int Index;
|
|
|
|
|
2022-08-19 16:13:36 +08:00
|
|
|
/// <summary>
|
|
|
|
/// The first <see cref="TaikoDifficultyHitObject"/> in this <see cref="MonoStreak"/>.
|
|
|
|
/// </summary>
|
|
|
|
public TaikoDifficultyHitObject FirstHitObject => HitObjects[0];
|
|
|
|
|
2022-09-30 09:10:56 +08:00
|
|
|
/// <summary>
|
|
|
|
/// The last <see cref="TaikoDifficultyHitObject"/> in this <see cref="MonoStreak"/>.
|
|
|
|
/// </summary>
|
|
|
|
public TaikoDifficultyHitObject LastHitObject => HitObjects[^1];
|
|
|
|
|
2022-08-19 16:13:36 +08:00
|
|
|
/// <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-05 14:41:40 +08:00
|
|
|
}
|
2022-07-15 19:07:01 +08:00
|
|
|
}
|