using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Physics2D.Abstract;
///
/// Represents a 2D collider.
///
public interface ICollider2D : IBehaviour, IAssignableTransform
{
///
/// Event triggered when a collision is detected.
///
event OnCollisionDetectedDelegate? OnCollisionDetected;
///
/// Event triggered when a collision is resolved.
///
event OnCollisionResolvedDelegate? OnCollisionResolved;
///
/// Event triggered when another triggers this .
///
event OnTriggeredDelegate? OnTriggered;
///
/// The associated with the .
///
IRigidBody2D? RigidBody2D { get; }
///
/// The value indicating whether the is a trigger.
///
bool IsTrigger { get; set; }
///
/// Recalculates properties.
///
void Recalculate();
void Detect(CollisionDetectionInformation collisionDetectionInformation);
void Resolve(CollisionDetectionInformation collisionDetectionInformation);
void Trigger(ICollider2D initiator);
delegate void OnCollisionDetectedDelegate(ICollider2D sender, CollisionDetectionInformation collisionDetectionInformation);
delegate void OnCollisionResolvedDelegate(ICollider2D sender, CollisionDetectionInformation collisionDetectionInformation);
delegate void OnTriggeredDelegate(ICollider2D sender, ICollider2D initiatorCollider);
}