1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 20:07:25 +08:00

Remove double resolution of EditorClock

This commit is contained in:
Dean Herbert 2020-05-25 15:40:25 +09:00
parent ed83ef202a
commit b44beb4137

View File

@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Edit
/// </summary> /// </summary>
protected readonly HitObject HitObject; protected readonly HitObject HitObject;
[Resolved] [Resolved(canBeNull: true)]
protected EditorClock EditorClock { get; private set; } protected EditorClock EditorClock { get; private set; }
private readonly IBindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>(); private readonly IBindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
@ -85,9 +85,6 @@ namespace osu.Game.Rulesets.Edit
PlacementActive = false; PlacementActive = false;
} }
[Resolved(canBeNull: true)]
private EditorClock editorClock { get; set; }
/// <summary> /// <summary>
/// Updates the position of this <see cref="PlacementBlueprint"/> to a new screen-space position. /// Updates the position of this <see cref="PlacementBlueprint"/> to a new screen-space position.
/// </summary> /// </summary>
@ -95,7 +92,7 @@ namespace osu.Game.Rulesets.Edit
public virtual void UpdatePosition(SnapResult snapResult) public virtual void UpdatePosition(SnapResult snapResult)
{ {
if (!PlacementActive) if (!PlacementActive)
HitObject.StartTime = snapResult.Time ?? editorClock?.CurrentTime ?? Time.Current; HitObject.StartTime = snapResult.Time ?? EditorClock?.CurrentTime ?? Time.Current;
} }
/// <summary> /// <summary>