1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-24 05:33:21 +08:00
osu-lazer/osu.Game/Rulesets/Difficulty/Skills/Skill.cs

42 lines
1.3 KiB
C#
Raw Normal View History

2023-06-23 00:37:25 +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 System.Collections.Generic;
using osu.Game.Rulesets.Difficulty.Preprocessing;
using osu.Game.Rulesets.Mods;
namespace osu.Game.Rulesets.Difficulty.Skills
{
/// <summary>
/// A bare minimal abstract skill for fully custom skill implementations.
/// </summary>
/// <remarks>
/// This class should be considered a "processing" class and not persisted.
/// </remarks>
public abstract class Skill
{
/// <summary>
/// Mods for use in skill calculations.
/// </summary>
protected IReadOnlyList<Mod> Mods => mods;
private readonly Mod[] mods;
protected Skill(Mod[] mods)
{
this.mods = mods;
}
/// <summary>
/// Process a <see cref="DifficultyHitObject"/>.
/// </summary>
/// <param name="current">The <see cref="DifficultyHitObject"/> to process.</param>
2022-05-23 04:45:27 +08:00
public abstract void Process(DifficultyHitObject current);
/// <summary>
/// Returns the calculated difficulty value representing all <see cref="DifficultyHitObject"/>s that have been processed up to this point.
/// </summary>
public abstract double DifficultyValue();
}
}