mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:52:55 +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.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using JetBrains.Annotations;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
@ -24,9 +21,8 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Spinners
|
|||||||
|
|
||||||
private bool isPlacingEnd;
|
private bool isPlacingEnd;
|
||||||
|
|
||||||
[Resolved(CanBeNull = true)]
|
[Resolved]
|
||||||
[CanBeNull]
|
private IBeatSnapProvider? beatSnapProvider { get; set; }
|
||||||
private IBeatSnapProvider beatSnapProvider { get; set; }
|
|
||||||
|
|
||||||
public SpinnerPlacementBlueprint()
|
public SpinnerPlacementBlueprint()
|
||||||
: base(new Spinner { Position = OsuPlayfield.BASE_SIZE / 2 })
|
: base(new Spinner { Position = OsuPlayfield.BASE_SIZE / 2 })
|
||||||
|
@ -38,7 +38,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
public readonly HitObject HitObject;
|
public readonly HitObject HitObject;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
protected EditorClock? EditorClock { get; private set; }
|
protected EditorClock EditorClock { get; private set; } = null!;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private EditorBeatmap beatmap { get; set; } = null!;
|
private EditorBeatmap beatmap { get; set; } = null!;
|
||||||
@ -150,7 +150,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
{
|
{
|
||||||
if (PlacementActive == PlacementState.Waiting)
|
if (PlacementActive == PlacementState.Waiting)
|
||||||
{
|
{
|
||||||
HitObject.StartTime = result.Time ?? EditorClock?.CurrentTime ?? Time.Current;
|
HitObject.StartTime = result.Time ?? EditorClock.CurrentTime;
|
||||||
|
|
||||||
if (HitObject is IHasComboInformation comboInformation)
|
if (HitObject is IHasComboInformation comboInformation)
|
||||||
comboInformation.UpdateComboInformation(getPreviousHitObject() as IHasComboInformation);
|
comboInformation.UpdateComboInformation(getPreviousHitObject() as IHasComboInformation);
|
||||||
|
Loading…
Reference in New Issue
Block a user