chore: converted PhysicsMaterial2D's to classes and renamed Default to be ReadOnly

This commit is contained in:
2026-04-04 14:07:37 +03:00
parent 53b342da46
commit 6db427f39b
4 changed files with 13 additions and 12 deletions

View File

@@ -6,7 +6,7 @@ public class RigidBody2D : Behaviour2D, IRigidBody2D
{
private const float LOWEST_ALLOWED_MASS = 0.00001f;
public IPhysicsMaterial2D Material { get; set; } = new PhysicsMaterial2DDefault();
public IPhysicsMaterial2D Material { get; set; } = ReadOnlyPhysicsMaterial2D.Default;
public Vector2D Velocity { get; set; } = Vector2D.Zero;
public float AngularVelocity { get; set; } = 0f;