mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 11:42:56 +08:00
Make EditorClock
non-nullable in PlacementBlueprint
This commit is contained in:
parent
214d7e07fa
commit
b58ab28765
@ -1,10 +1,7 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Input.Events;
|
||||
@ -24,9 +21,8 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Spinners
|
||||
|
||||
private bool isPlacingEnd;
|
||||
|
||||
[Resolved(CanBeNull = true)]
|
||||
[CanBeNull]
|
||||
private IBeatSnapProvider beatSnapProvider { get; set; }
|
||||
[Resolved]
|
||||
private IBeatSnapProvider? beatSnapProvider { get; set; }
|
||||
|
||||
public SpinnerPlacementBlueprint()
|
||||
: base(new Spinner { Position = OsuPlayfield.BASE_SIZE / 2 })
|
||||
|
@ -38,7 +38,7 @@ namespace osu.Game.Rulesets.Edit
|
||||
public readonly HitObject HitObject;
|
||||
|
||||
[Resolved]
|
||||
protected EditorClock? EditorClock { get; private set; }
|
||||
protected EditorClock EditorClock { get; private set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private EditorBeatmap beatmap { get; set; } = null!;
|
||||
@ -150,7 +150,7 @@ namespace osu.Game.Rulesets.Edit
|
||||
{
|
||||
if (PlacementActive == PlacementState.Waiting)
|
||||
{
|
||||
HitObject.StartTime = result.Time ?? EditorClock?.CurrentTime ?? Time.Current;
|
||||
HitObject.StartTime = result.Time ?? EditorClock.CurrentTime;
|
||||
|
||||
if (HitObject is IHasComboInformation comboInformation)
|
||||
comboInformation.UpdateComboInformation(getPreviousHitObject() as IHasComboInformation);
|
||||
|
Loading…
Reference in New Issue
Block a user