Files
MonoGame.Extended/Source/MonoGame.Extended.Collisions/QuadTree/CollisionEventArgs.cs
T
Jon Seaman 862b64ac7b Rectangles now collide with circles (#513)
* Added CircleF and RectangleF intersection method

* Simplified shape implementation

* Docs

* Collision system uses shapes

* QuadTree collision allows circles

* ICollisionActor remove setter

+semver: patch

* Added position to IShapeF

+semver: patch

* Added CollisionComponent contains

* Fix penetration vector between circles

* Circle Rectangle penetration vector

* Added test for Rectangle Rectangle Collision

* Add docs, fix test
2018-06-14 21:27:37 +10:00

26 lines
791 B
C#

using System;
using Microsoft.Xna.Framework;
namespace MonoGame.Extended.Collisions
{
/// <summary>
/// This class holds data on a collision. It is passed as a parameter to
/// OnCollision methods.
/// </summary>
public class CollisionEventArgs : EventArgs
{
/// <summary>
/// Gets the object being collided with.
/// </summary>
public ICollisionActor Other { get; internal set; }
/// <summary>
/// Gets a vector representing the overlap between the two objects.
/// </summary>
/// <remarks>
/// This vector starts at the edge of <see cref="Other"/> and ends at
/// the Actor's location.
/// </remarks>
public Vector2 PenetrationVector { get; internal set; }
}
}