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 CTileManager * | m_pTileManager = nullptr |
| | Pointer to tile manager.
|
| |
|
static CPlayer * | m_pPlayer = nullptr |
| | Pointer to player character.
|
| |
|
static Vector2 | m_vWorldSize |
| | World height and width.
|
| |
|
static bool | m_bGodMode = false |
| | God mode flag.
|
| |
|
static bool | m_bShowState = false |
| | Show NPC state flag.
|
| |
|
static bool | m_bShowBounds = false |
| | Draw bounding boxes and circles flag.
|
| |
A collection of all of the game objects.
◆ 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.
◆ Create()
| CObject * CObjectManager::Create |
( |
eObject | t, |
|
|
const Vector2 & | pos, |
|
|
float | d = 0.0f ) |
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. |
| d | Initial orientation. |
- Returns
- Pointer to the object created.
◆ Draw()
| void CObjectManager::Draw |
( |
| ) |
|
Draw the tiled background and the objects in the object list.
◆ FireGun()
Create a bullet object and a flash particle effect. It is assumed that the object is round and that the bullet appears at the edge of the object in the direction that it is facing and continues moving in that direction.
- 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.
- Parameters
-
| p0 | Pointer to the first object. |
| p1 | Pointer to the second object. |