Collision.CollisionManager
Description: Defines a manager that will check for collisions between objects that it is monitoring.
Implements: EndGate.IUpdateable , EndGate.IDisposable
Constructors
CollisionManager ()
Creates a new instance of CollisionManager.
Fields
OnCollision: EndGate.EventHandler2 <Collision.Collidable, Collision.Collidable>
Gets an event that is triggered when a collision happens among two of the monitored objects. Functions can be bound or unbound to this event to be executed when the event triggers.
Methods
Monitor()
Monitors the provided collidable and will trigger its Collided function and OnCollision event whenever a collision occurs with it and another Collidable. If the provided collidable gets disposed it will automatically become unmonitored.
Unmonitor()
Unmonitors the provided collidable. The Collided function and OnCollision event will no longer be triggered when an actual collision may have occurred. Disposing a monitored collidable will automatically be unmonitored
Update()
Checks for collisions within its monitored objects. Games CollisionManager's automatically have their Update functions called at the beginning of each update loop.
Dispose()
Destroys removes all monitored collidables and destroys the collision manager.
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.