refactor: Renamed OnCollisionPreResolve to OnCollisionDetected

This commit is contained in:
Syntriax 2024-01-27 19:59:27 +03:00
parent 05d88f7ca2
commit 4d9121118d
2 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ namespace Syntriax.Engine.Physics2D.Abstract;
public interface ICollider2D : IBehaviour, IAssignableTransform
{
Action<ICollider2D, CollisionDetectionInformation>? OnCollisionPreResolve { get; set; }
Action<ICollider2D, CollisionDetectionInformation>? OnCollisionDetected { get; set; }
Action<ICollider2D, CollisionDetectionInformation>? OnCollisionResolved { get; set; }
IRigidBody2D? RigidBody2D { get; }

View File

@ -62,8 +62,8 @@ public class PhysicsEngine2D : IPhysicsEngine2D
if (collisionDetector.TryDetect(colliderX, colliderY, out CollisionDetectionInformation information))
{
colliderX.OnCollisionPreResolve?.Invoke(colliderX, information);
colliderY.OnCollisionPreResolve?.Invoke(colliderY, information);
colliderX.OnCollisionDetected?.Invoke(colliderX, information);
colliderY.OnCollisionDetected?.Invoke(colliderY, information);
Vector2D displacementVector = information.Normal * information.Penetration;