mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 06:12:56 +08:00
Set hitobject placement time manually
This commit is contained in:
parent
e931aa3d9e
commit
b56d09c83b
@ -31,6 +31,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Masks
|
||||
|
||||
protected override bool OnClick(ClickEvent e)
|
||||
{
|
||||
HitObject.StartTime = EditorClock.CurrentTime;
|
||||
HitObject.Position = e.MousePosition;
|
||||
Finish();
|
||||
return true;
|
||||
|
@ -25,7 +25,7 @@ namespace osu.Game.Rulesets.Edit
|
||||
/// </summary>
|
||||
protected readonly HitObject HitObject;
|
||||
|
||||
private IAdjustableClock clock;
|
||||
protected IClock EditorClock { get; private set; }
|
||||
|
||||
public PlacementMask(HitObject hitObject)
|
||||
{
|
||||
@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Edit
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(IBindableBeatmap workingBeatmap, IAdjustableClock clock)
|
||||
{
|
||||
this.clock = clock;
|
||||
EditorClock = clock;
|
||||
|
||||
HitObject.ApplyDefaults(workingBeatmap.Value.Beatmap.ControlPointInfo, workingBeatmap.Value.Beatmap.BeatmapInfo.BaseDifficulty);
|
||||
}
|
||||
@ -45,13 +45,6 @@ namespace osu.Game.Rulesets.Edit
|
||||
/// </summary>
|
||||
public void Finish() => PlacementFinished?.Invoke(HitObject);
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
HitObject.StartTime = clock.CurrentTime;
|
||||
}
|
||||
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => Parent?.ReceivePositionalInputAt(screenSpacePos) ?? false;
|
||||
|
||||
protected override bool Handle(UIEvent e)
|
||||
|
Loading…
Reference in New Issue
Block a user