Do full placement on mouse down

This commit is contained in:
smoogipoo 2020-04-24 12:27:56 +09:00
parent ce602f84be
commit ca692f30e6
1 changed files with 1 additions and 7 deletions

View File

@ -33,19 +33,13 @@ protected override bool OnMouseDown(MouseDownEvent e)
{
if (e.Button == MouseButton.Left)
{
BeginPlacement();
EndPlacement(true);
return true;
}
return base.OnMouseDown(e);
}
protected override void OnMouseUp(MouseUpEvent e)
{
if (e.Button == MouseButton.Left)
EndPlacement(true);
}
public override void UpdatePosition(Vector2 screenSpacePosition) => HitObject.Position = ToLocalSpace(screenSpacePosition);
}
}