ICollisionService
Namespace: MonineEngine.Core
The interface for the CollisionService.
public interface ICollisionService : IService, System.IDisposable
Implements IService, IDisposable
Attributes NullableContextAttribute
Methods
RegisterCollider(Collider)
Register a collider to the service.
void RegisterCollider(Collider collider)
Parameters
collider Collider
The collider to register.
UnregisterCollider(Collider)
Unregister a collider from the service.
void UnregisterCollider(Collider collider)
Parameters
collider Collider
The collider to unregister.
Remarks:
If the given collider is not registered, a warning will be thrown, and nothing will happen.
GetCollidersInBounds(Rectangle)
Retrieves all registered colliders that collide with the given bounds.
IEnumerable<Collider> GetCollidersInBounds(Rectangle bounds)
Parameters
bounds Rectangle
The bounds of the area to check.
Returns
IEnumerable<Collider>
An IEnumerable<T> with the colliders within the bounds.
GetAllColliders()
Retrieves all registered colliders.
IEnumerable<Collider> GetAllColliders()
Returns
IEnumerable<Collider>
An IEnumerable<T> with all registered colliders.