Change CollisionEventArgs settter to init require (#978)

Closes #977
This commit is contained in:
2025-03-20 15:41:30 +01:00
committed by GitHub
parent c4bfb3c37f
commit 36d9b3084a
@@ -12,7 +12,7 @@ namespace MonoGame.Extended.Collisions
/// <summary>
/// Gets the object being collided with.
/// </summary>
public ICollisionActor Other { get; internal set; }
public required ICollisionActor Other { get; init; }
/// <summary>
/// Gets a vector representing the overlap between the two objects.
@@ -21,6 +21,6 @@ namespace MonoGame.Extended.Collisions
/// This vector starts at the edge of <see cref="Other"/> and ends at
/// the Actor's location.
/// </remarks>
public Vector2 PenetrationVector { get; internal set; }
public required Vector2 PenetrationVector { get; init; }
}
}
}