docs(physics2d): Abstract

This commit is contained in:
2024-02-01 12:26:28 +03:00
parent 2f4137dae2
commit 2b19b24a26
8 changed files with 103 additions and 0 deletions

View File

@@ -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();
}