1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-24 22:22:54 +08:00

Pass mod class that cause fail

This commit is contained in:
Peter-io 2024-07-11 17:50:02 +02:00
parent 2aeda54865
commit 7e1ee6151f

View File

@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Mods
public virtual bool RestartOnFail => Restart.Value;
private Action? triggerFailureDelegate;
private Action<object>? triggerFailureDelegate;
public void ApplyToHealthProcessor(HealthProcessor healthProcessor)
{
@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Mods
/// <summary>
/// Immediately triggers a failure on the loaded <see cref="HealthProcessor"/>.
/// </summary>
protected void TriggerFailure() => triggerFailureDelegate?.Invoke();
protected void TriggerFailure() => triggerFailureDelegate?.Invoke(this);
/// <summary>
/// Determines whether <paramref name="result"/> should trigger a failure. Called every time a