diff --git a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/Objects/EmptyFreeformHitObject.cs b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/Objects/EmptyFreeformHitObject.cs
index 9cd18d2d9f..0699f5d039 100644
--- a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/Objects/EmptyFreeformHitObject.cs
+++ b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/Objects/EmptyFreeformHitObject.cs
@@ -14,7 +14,16 @@ namespace osu.Game.Rulesets.EmptyFreeform.Objects
public Vector2 Position { get; set; }
- public float X => Position.X;
- public float Y => Position.Y;
+ public float X
+ {
+ get => Position.X;
+ set => Position = new Vector2(value, Y);
+ }
+
+ public float Y
+ {
+ get => Position.Y;
+ set => Position = new Vector2(X, value);
+ }
}
}
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/Objects/PippidonHitObject.cs b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/Objects/PippidonHitObject.cs
index 0c22554e82..f938d26b26 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/Objects/PippidonHitObject.cs
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/Objects/PippidonHitObject.cs
@@ -14,7 +14,16 @@ namespace osu.Game.Rulesets.Pippidon.Objects
public Vector2 Position { get; set; }
- public float X => Position.X;
- public float Y => Position.Y;
+ public float X
+ {
+ get => Position.X;
+ set => Position = new Vector2(value, Y);
+ }
+
+ public float Y
+ {
+ get => Position.Y;
+ set => Position = new Vector2(X, value);
+ }
}
}
diff --git a/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs b/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs
index 329055b3dd..2018fd5ea9 100644
--- a/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs
+++ b/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs
@@ -210,11 +210,27 @@ namespace osu.Game.Rulesets.Catch.Objects
///
public float LegacyConvertedY { get; set; } = DEFAULT_LEGACY_CONVERT_Y;
- float IHasXPosition.X => OriginalX;
+ float IHasXPosition.X
+ {
+ get => OriginalX;
+ set => OriginalX = value;
+ }
- float IHasYPosition.Y => LegacyConvertedY;
+ float IHasYPosition.Y
+ {
+ get => LegacyConvertedY;
+ set => LegacyConvertedY = value;
+ }
- Vector2 IHasPosition.Position => new Vector2(OriginalX, LegacyConvertedY);
+ Vector2 IHasPosition.Position
+ {
+ get => new Vector2(OriginalX, LegacyConvertedY);
+ set
+ {
+ ((IHasXPosition)this).X = value.X;
+ ((IHasYPosition)this).Y = value.Y;
+ }
+ }
#endregion
}
diff --git a/osu.Game.Rulesets.Mania/Objects/ManiaHitObject.cs b/osu.Game.Rulesets.Mania/Objects/ManiaHitObject.cs
index 25ad6b997d..c8c8867bc6 100644
--- a/osu.Game.Rulesets.Mania/Objects/ManiaHitObject.cs
+++ b/osu.Game.Rulesets.Mania/Objects/ManiaHitObject.cs
@@ -25,7 +25,11 @@ namespace osu.Game.Rulesets.Mania.Objects
#region LegacyBeatmapEncoder
- float IHasXPosition.X => Column;
+ float IHasXPosition.X
+ {
+ get => Column;
+ set => Column = (int)value;
+ }
#endregion
}
diff --git a/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs b/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs
index 1b0993b698..8c1bd6302e 100644
--- a/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs
+++ b/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs
@@ -59,8 +59,17 @@ namespace osu.Game.Rulesets.Osu.Objects
set => position.Value = value;
}
- public float X => Position.X;
- public float Y => Position.Y;
+ public float X
+ {
+ get => Position.X;
+ set => Position = new Vector2(value, Position.Y);
+ }
+
+ public float Y
+ {
+ get => Position.Y;
+ set => Position = new Vector2(Position.X, value);
+ }
public Vector2 StackedPosition => Position + StackOffset;
diff --git a/osu.Game/Rulesets/Objects/Legacy/ConvertHitObject.cs b/osu.Game/Rulesets/Objects/Legacy/ConvertHitObject.cs
index ced9b24ebf..091b0a1e6f 100644
--- a/osu.Game/Rulesets/Objects/Legacy/ConvertHitObject.cs
+++ b/osu.Game/Rulesets/Objects/Legacy/ConvertHitObject.cs
@@ -21,9 +21,17 @@ namespace osu.Game.Rulesets.Objects.Legacy
public int ComboOffset { get; set; }
- public float X => Position.X;
+ public float X
+ {
+ get => Position.X;
+ set => Position = new Vector2(value, Position.Y);
+ }
- public float Y => Position.Y;
+ public float Y
+ {
+ get => Position.Y;
+ set => Position = new Vector2(Position.X, value);
+ }
public Vector2 Position { get; set; }
diff --git a/osu.Game/Rulesets/Objects/Types/IHasPosition.cs b/osu.Game/Rulesets/Objects/Types/IHasPosition.cs
index 8948fe59a9..e9b3cc46eb 100644
--- a/osu.Game/Rulesets/Objects/Types/IHasPosition.cs
+++ b/osu.Game/Rulesets/Objects/Types/IHasPosition.cs
@@ -13,6 +13,6 @@ namespace osu.Game.Rulesets.Objects.Types
///
/// The starting position of the HitObject.
///
- Vector2 Position { get; }
+ Vector2 Position { get; set; }
}
}
diff --git a/osu.Game/Rulesets/Objects/Types/IHasXPosition.cs b/osu.Game/Rulesets/Objects/Types/IHasXPosition.cs
index 7e55b21050..18f1f996e3 100644
--- a/osu.Game/Rulesets/Objects/Types/IHasXPosition.cs
+++ b/osu.Game/Rulesets/Objects/Types/IHasXPosition.cs
@@ -11,6 +11,6 @@ namespace osu.Game.Rulesets.Objects.Types
///
/// The starting X-position of this HitObject.
///
- float X { get; }
+ float X { get; set; }
}
}
diff --git a/osu.Game/Rulesets/Objects/Types/IHasYPosition.cs b/osu.Game/Rulesets/Objects/Types/IHasYPosition.cs
index d2561b10a7..dcaeaf594a 100644
--- a/osu.Game/Rulesets/Objects/Types/IHasYPosition.cs
+++ b/osu.Game/Rulesets/Objects/Types/IHasYPosition.cs
@@ -11,6 +11,6 @@ namespace osu.Game.Rulesets.Objects.Types
///
/// The starting Y-position of this HitObject.
///
- float Y { get; }
+ float Y { get; set; }
}
}