Mark the property as non-nullable.

This commit is contained in:
andy840119
2022-07-31 21:43:16 +08:00
parent 72961ec336
commit 632577389d
7 changed files with 14 additions and 34 deletions

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Diagnostics;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@ -32,7 +31,7 @@ namespace osu.Game.Rulesets.Osu.Mods
public override double ScoreMultiplier => UsesDefaultConfiguration ? 1.12 : 1;
public override Type[] IncompatibleMods => new[] { typeof(OsuModFlashlight) };
private DrawableOsuBlinds? blinds;
private DrawableOsuBlinds blinds = null!;
public void ApplyToDrawableRuleset(DrawableRuleset<OsuHitObject> drawableRuleset)
{
@ -41,8 +40,6 @@ namespace osu.Game.Rulesets.Osu.Mods
public void ApplyToHealthProcessor(HealthProcessor healthProcessor)
{
Debug.Assert(blinds != null);
healthProcessor.Health.ValueChanged += health => { blinds.AnimateClosedness((float)health.NewValue); };
}