The object manager.
More...
#include <ObjectManager.h>
|
|
static Sage::CSpriteRenderer * | m_pRenderer = nullptr |
| | Pointer to renderer.
|
| |
|
static CObjectManager * | m_pObjectManager = nullptr |
| | Pointer to object manager.
|
| |
|
static Sage::CParticleEngine2D * | m_pParticleEngine = nullptr |
| | Pointer to particle engine.
|
| |
|
static CPlayer * | m_pPlayer = nullptr |
| | Pointer to player character.
|
| |
|
static bool | m_bGodMode = false |
| | God mode flag.
|
| |
|
static bool | m_bShowState = false |
| | Show NPC state flag.
|
| |
|
static bool | m_bShowBounds = false |
| | Show collision circle flag.
|
| |
A collection of all of the game objects.
◆ AtWorldEdge()
| bool CObjectManager::AtWorldEdge |
( |
CObject * | p, |
|
|
Vector2 & | norm, |
|
|
float & | d ) const |
|
private |
Test whether an object's left, right, top or bottom edge has crossed the left, right, top, bottom edge of the world, respectively. If so, then the object's position is corrected. This function assumes that the bottom left corner of the world is at the origin.
- Parameters
-
| p | Pointer to an object. |
| norm | [out] Collision normal. |
| d | [out] Overlap distance. |
- Returns
- true if the object overlaps the edge of the world.
◆ BroadPhase()
| void CObjectManager::BroadPhase |
( |
| ) |
|
|
private |
Perform collision detection and response for each object with the world edges and for all objects with another object, making sure that each pair of objects is processed only once. Also collide objects with the edges of the worlod.
◆ Create()
Create an object and put a pointer to it at the back of the object list m_stdObjectList, which it inherits from Sage::CBaseObjectManager.
- Parameters
-
| t | Object type. |
| pos | Initial position. |
- Returns
- Pointer to the object created.
◆ FireGun()
Create a bullet object and a flash particle effect. The bullet and the muzzle flash appear a little beywod the gun muzzle and the bullet proceeds along the view bector with a random deflection to add some variability.
- Parameters
-
| pObj | Pointer to an armed object. |
◆ GetNumGuards()
| const UINT CObjectManager::GetNumGuards |
( |
| ) |
const |
Get the number of guards.
- Returns
- The number of guards.
◆ NarrowPhase()
Perform collision detection and response for a pair of objects. Makes use of the helper function Identify() because this function may be called with the objects in an arbitrary order.
- Parameters
-
| p0 | Pointer to the first object. |
| p1 | Pointer to the second object. |