docs(physics2d): Abstract
This commit is contained in:
@@ -2,7 +2,19 @@ using Syntriax.Engine.Physics2D.Abstract;
|
||||
|
||||
namespace Syntriax.Engine.Physics2D;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a 2D collision detector.
|
||||
/// </summary>
|
||||
public interface ICollisionDetector2D
|
||||
{
|
||||
/// <summary>
|
||||
/// Attempts to detect a collision between two <see cref="ICollider2D"/>s.
|
||||
/// </summary>
|
||||
/// <typeparam name="T1">Type of the first <see cref="ICollider2D"/>.</typeparam>
|
||||
/// <typeparam name="T2">Type of the second <see cref="ICollider2D"/>.</typeparam>
|
||||
/// <param name="left">The first <see cref="ICollider2D"/>.</param>
|
||||
/// <param name="right">The second <see cref="ICollider2D"/>.</param>
|
||||
/// <param name="collisionInformation">Information about the collision.</param>
|
||||
/// <returns><see cref="true"/> if a collision is detected, otherwise <see cref="false"/>.</returns>
|
||||
bool TryDetect<T1, T2>(T1 left, T2 right, out CollisionDetectionInformation collisionInformation) where T1 : ICollider2D where T2 : ICollider2D;
|
||||
}
|
||||
|
Reference in New Issue
Block a user