ICollisionActor.cs 808 B

123456789101112131415161718192021222324252627
  1. using System;
  2. namespace MonoGame.Extended.Collisions
  3. {
  4. /// <summary>
  5. /// An actor that can be collided with.
  6. /// </summary>
  7. public interface ICollisionActor
  8. {
  9. /// <summary>
  10. /// A name of layer, which will contains this actor.
  11. /// If it equals null, an actor will insert into a default layer
  12. /// </summary>
  13. string LayerName { get => null; }
  14. /// <summary>
  15. /// A bounds of an actor. It is using for collision calculating
  16. /// </summary>
  17. IShapeF Bounds { get; }
  18. /// <summary>
  19. /// It will called, when collision with an another actor fires
  20. /// </summary>
  21. /// <param name="collisionInfo">Data about collision</param>
  22. void OnCollision(CollisionEventArgs collisionInfo);
  23. }
  24. }