mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 17:17:24 +08:00
Remove double resolution of EditorClock
This commit is contained in:
parent
ed83ef202a
commit
b44beb4137
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user