Handles collisions between game objects.
More...
#include <CollisionManager.h>
Handles collisions between game objects.
At the beginning of gameplay, collision types should be added to the manager via CollisionManager::AddCollisionType(). Througout gameplay the Level will make calls to CollisionManager::CheckCollision(), to see if specific game objects are colliding. If a collision is detected, the callback parameter that was specified (when the collision type was added) will be called.
◆ AddCollisionType()
Adds a type of collision occurance to the manager.
- Parameters
-
| type1 | The collision mask type of the first object. |
| type2 | The collision mask type of the second object. |
| callback | The callback function that should run when the specified object types collide. |
◆ AddNonCollisionType()
Adds a type of collision occurance to make the manager ignore.
- Parameters
-
| type1 | The collision mask type of the first object. |
| type2 | The collision mask type of the second object. |
◆ CheckCollision()
| void ShooterLibrary::CollisionManager::CheckCollision |
( |
GameObject * |
pGameObject1, |
|
|
GameObject * |
pGameObject2 |
|
) |
| |
|
virtual |
Determines if two objects are colliding. If they are the specified callback function is run.
- Parameters
-
- See also
- Level::Update()
The documentation for this class was generated from the following files: