2023-06-23 00:37:25 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
2021-02-05 13:04:32 +08:00
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
|
|
using osu.Game.Rulesets.Objects;
|
|
|
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
2023-08-23 19:12:18 +08:00
|
|
|
|
using osu.Game.Rulesets.Scoring;
|
2021-02-08 19:11:06 +08:00
|
|
|
|
using osu.Game.Rulesets.UI;
|
2021-02-05 13:04:32 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Osu.UI
|
|
|
|
|
{
|
|
|
|
|
public interface IHitPolicy
|
|
|
|
|
{
|
2021-02-05 13:09:25 +08:00
|
|
|
|
/// <summary>
|
2021-02-08 19:11:06 +08:00
|
|
|
|
/// The <see cref="IHitObjectContainer"/> containing the <see cref="DrawableHitObject"/>s which this <see cref="IHitPolicy"/> applies to.
|
2021-02-05 13:09:25 +08:00
|
|
|
|
/// </summary>
|
2021-02-08 19:11:06 +08:00
|
|
|
|
IHitObjectContainer HitObjectContainer { set; }
|
2021-02-05 13:09:25 +08:00
|
|
|
|
|
2021-02-05 13:04:32 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Determines whether a <see cref="DrawableHitObject"/> can be hit at a point in time.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="hitObject">The <see cref="DrawableHitObject"/> to check.</param>
|
|
|
|
|
/// <param name="time">The time to check.</param>
|
2023-08-23 19:12:18 +08:00
|
|
|
|
/// <param name="result">The result that the object would be judged with if hit.</param>
|
2021-02-05 13:04:32 +08:00
|
|
|
|
/// <returns>Whether <paramref name="hitObject"/> can be hit at the given <paramref name="time"/>.</returns>
|
2023-08-23 19:12:18 +08:00
|
|
|
|
ClickAction CheckHittable(DrawableHitObject hitObject, double time, HitResult result);
|
2021-02-05 13:04:32 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Handles a <see cref="HitObject"/> being hit.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="hitObject">The <see cref="HitObject"/> that was hit.</param>
|
|
|
|
|
void HandleHit(DrawableHitObject hitObject);
|
|
|
|
|
}
|
|
|
|
|
}
|