1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:33:30 +08:00

Simplify column assignment

This commit is contained in:
Dean Herbert 2020-05-20 21:13:08 +09:00
parent 7c9fbb6fcf
commit e3cec9cf6c

View File

@ -17,7 +17,20 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
{
protected new T HitObject => (T)base.HitObject;
protected Column Column;
private Column column;
public Column Column
{
get => column;
set
{
if (value == column)
return;
column = value;
HitObject.Column = column.Index;
}
}
protected ManiaPlacementBlueprint(T hitObject)
: base(hitObject)
@ -31,9 +44,8 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
return false;
if (Column == null)
return base.OnMouseDown(e);
return false;
HitObject.Column = Column.Index;
BeginPlacement(true);
return true;
}