mirror of
https://github.com/ppy/osu
synced 2025-02-09 14:47:33 +00:00
Fix naming and update in line with nullability
This commit is contained in:
parent
210c5e7c53
commit
cb7b246e33
@ -19,18 +19,19 @@ namespace osu.Game.Rulesets.Mods
|
||||
public virtual bool PerformFail() => true;
|
||||
|
||||
public virtual bool RestartOnFail => Restart.Value;
|
||||
private event Action failureTriggered;
|
||||
|
||||
private Action? triggerFailureDelegate;
|
||||
|
||||
public void ApplyToHealthProcessor(HealthProcessor healthProcessor)
|
||||
{
|
||||
failureTriggered = healthProcessor.TriggerFailure;
|
||||
triggerFailureDelegate = healthProcessor.TriggerFailure;
|
||||
healthProcessor.FailConditions += FailCondition;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Immediately triggers a failure on the loaded <see cref="HealthProcessor"/>.
|
||||
/// </summary>
|
||||
protected void TriggerFailure() => failureTriggered?.Invoke();
|
||||
protected void TriggerFailure() => triggerFailureDelegate?.Invoke();
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether <paramref name="result"/> should trigger a failure. Called every time a
|
||||
|
Loading…
Reference in New Issue
Block a user