Apply suggested refactorings

This commit is contained in:
smoogipoo
2019-12-10 13:12:54 +09:00
parent 2c4c190f15
commit ab0f2e7c6a
2 changed files with 7 additions and 9 deletions

View File

@ -30,8 +30,9 @@ namespace osu.Game.Rulesets.Objects
/// Creates a new <see cref="PathControlPoint"/>.
/// </summary>
public PathControlPoint()
: this(Vector2.Zero, null)
{
Position.ValueChanged += _ => Changed?.Invoke();
Type.ValueChanged += _ => Changed?.Invoke();
}
/// <summary>
@ -40,12 +41,10 @@ namespace osu.Game.Rulesets.Objects
/// <param name="position">The initial position.</param>
/// <param name="type">The initial type.</param>
public PathControlPoint(Vector2 position, PathType? type = null)
: this()
{
Position.Value = position;
Type.Value = type;
Position.ValueChanged += _ => Changed?.Invoke();
Type.ValueChanged += _ => Changed?.Invoke();
}
public bool Equals(PathControlPoint other) => Position.Value == other?.Position.Value && Type.Value == other.Type.Value;