mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 23:42:55 +08:00
Expose general control point change event
This commit is contained in:
parent
3e0f499e72
commit
0149e47673
@ -18,6 +18,17 @@ namespace osu.Game.Rulesets.Objects
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly Bindable<PathType?> Type = new Bindable<PathType?>();
|
public readonly Bindable<PathType?> Type = new Bindable<PathType?>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Invoked when any property of this <see cref="PathControlPoint"/> is changed.
|
||||||
|
/// </summary>
|
||||||
|
internal event Action Changed;
|
||||||
|
|
||||||
|
public PathControlPoint()
|
||||||
|
{
|
||||||
|
Position.ValueChanged += _ => Changed?.Invoke();
|
||||||
|
Type.ValueChanged += _ => Changed?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
public bool Equals(PathControlPoint other) => Position.Value == other.Position.Value && Type.Value == other.Type.Value;
|
public bool Equals(PathControlPoint other) => Position.Value == other.Position.Value && Type.Value == other.Type.Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user