Collision.Collidable
Description: Defines a collidable object that can be used to detect collisions with other objects.
Implements: EndGate.IDisposable
Constructors
Collidable (bounds)
Creates a new instance of Collidable.
bounds: EndGate.Bounds.Bounds2d
Initial bounds for the Collidable.
Fields
Bounds: EndGate.Bounds.Bounds2d
Gets or sets the Bounds of the collidable.
OnCollision: EndGate.EventHandler1 <Collision.CollisionData>
Gets an event that is triggered when a collision happens. Functions can be bound or unbound to this event to be executed when the event triggers.
OnDisposed: EndGate.EventHandler1 <Collidable>
Gets an event that is triggered when the Collidable has been disposed. Functions can be bound or unbound to this event to be executed when the event triggers.
Methods
IsCollidingWith()
Determines if the provided collidable is colliding with this Collidable.
Collided()
Triggers the OnCollision event. Can also be overridden from derived classes to be called when a collision occurs if the collidable is being used with a CollisionManager
Dispose()
Triggers the OnDisposed event. If this Collidable is used with a CollisionManager it will be unmonitored when disposed.
Examples
There's currently no example available for this page. If you'd like to suggest one send me an containing a description, code, and link to the page for the suggested example. As a thanks I'll associate the code snippet with your name directly below the example if approved.