docs(physics2d): Abstract
This commit is contained in:
@@ -4,15 +4,38 @@ using Syntriax.Engine.Core.Abstract;
|
||||
|
||||
namespace Syntriax.Engine.Physics2D.Abstract;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a 2D collider.
|
||||
/// </summary>
|
||||
public interface ICollider2D : IBehaviour, IAssignableTransform
|
||||
{
|
||||
/// <summary>
|
||||
/// Event triggered when a collision is detected.
|
||||
/// </summary>
|
||||
Action<ICollider2D, CollisionDetectionInformation>? OnCollisionDetected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Event triggered when a collision is resolved.
|
||||
/// </summary>
|
||||
Action<ICollider2D, CollisionDetectionInformation>? OnCollisionResolved { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Event triggered when another <see cref="ICollider2D"/> triggers this <see cref="ICollider2D"/>.
|
||||
/// </summary>
|
||||
Action<ICollider2D, ICollider2D>? OnTriggered { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="IRigidBody2D"/> associated with the <see cref="ICollider2D"/>.
|
||||
/// </summary>
|
||||
IRigidBody2D? RigidBody2D { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The value indicating whether the <see cref="ICollider2D"/> is a trigger.
|
||||
/// </summary>
|
||||
bool IsTrigger { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Recalculates <see cref="ICollider2D"/> properties.
|
||||
/// </summary>
|
||||
void Recalculate();
|
||||
}
|
||||
|
Reference in New Issue
Block a user