1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-05 04:52:53 +08:00

Use non-nullable instead in the taiko ruleset.

This commit is contained in:
andy840119 2022-08-02 00:48:23 +08:00
parent 1fe7e4d19a
commit b1d320bf67
2 changed files with 3 additions and 6 deletions

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Layout; using osu.Framework.Layout;
using osu.Game.Configuration; using osu.Game.Configuration;
@ -37,9 +36,9 @@ namespace osu.Game.Rulesets.Taiko.Mods
public override float DefaultFlashlightSize => 250; public override float DefaultFlashlightSize => 250;
protected override Flashlight CreateFlashlight() => new TaikoFlashlight(this, playfield.AsNonNull()); protected override Flashlight CreateFlashlight() => new TaikoFlashlight(this, playfield);
private TaikoPlayfield? playfield; private TaikoPlayfield playfield = null!;
public override void ApplyToDrawableRuleset(DrawableRuleset<TaikoHitObject> drawableRuleset) public override void ApplyToDrawableRuleset(DrawableRuleset<TaikoHitObject> drawableRuleset)
{ {

View File

@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Taiko.Mods
/// </summary> /// </summary>
private const float fade_out_duration = 0.375f; private const float fade_out_duration = 0.375f;
private DrawableTaikoRuleset? drawableRuleset; private DrawableTaikoRuleset drawableRuleset = null!;
public void ApplyToDrawableRuleset(DrawableRuleset<TaikoHitObject> drawableRuleset) public void ApplyToDrawableRuleset(DrawableRuleset<TaikoHitObject> drawableRuleset)
{ {
@ -45,8 +45,6 @@ namespace osu.Game.Rulesets.Taiko.Mods
protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state) protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state)
{ {
Debug.Assert(drawableRuleset != null);
switch (hitObject) switch (hitObject)
{ {
case DrawableDrumRollTick: case DrawableDrumRollTick: