Handles the Entities in the active state.
More...
#include <entitymanager.h>
Inherited by EntityEditor.
|
EntityList | mEntities |
| The list of entities in the scene.
|
|
std::shared_ptr< Camera > | mCamera |
|
Handles the Entities in the active state.
A class to simplify handling of the Entities, and simple collision interactions between them
void EntityManager::CheckMouseEvents |
( |
| ) |
|
|
virtual |
Testing the new method for mouse handling
std::shared_ptr< Entity > EntityManager::GetEntity |
( |
const std::string & |
name | ) |
|
Get an Entity by its name
- Parameters
-
- Returns
- A shared_ptr to the entity, nullptr if lookup failed
void EntityManager::HandleMouseEvent |
( |
const SDL_MouseButtonEvent & |
mouseEvent | ) |
|
|
virtual |
Handle mouse clicks, run through the active entities find which was clicked, and call its response function
- Parameters
-
mouseEvent | The mouse event that we're processing |
Reimplemented in EntityEditor.
void EntityManager::HandleMouseEvent |
( |
const SDL_MouseMotionEvent & |
mouseEvent | ) |
|
|
virtual |
Handle Mouse motion, check if the mouse entered/exited an Entity
- Parameters
-
mouseEvent | The mouse event that we're processing |
void EntityManager::Move |
( |
float |
deltaT | ) |
|
|
virtual |
Move the entities
- Parameters
-
void EntityManager::Register |
( |
std::shared_ptr< Entity > |
obj | ) |
|
Register an Entity to be managed by the manager
- Parameters
-
void EntityManager::Register |
( |
std::shared_ptr< Camera > |
camera | ) |
|
Register the scene camera with the manager so that it can be used in checking which objects to deal with
- Parameters
-
void EntityManager::Remove |
( |
std::shared_ptr< Entity > |
entity | ) |
|
Remove an Entity with the shared_ptr passed
- Parameters
-
entity | The shared_ptr of the Entity to remove |
Serialize all the game object data to a Json::Value and return it
- Returns
- Json::Value containing the gameobject data
void EntityManager::SetCollisionMaps |
( |
Map * |
map | ) |
|
Setup Entity collision maps
- Parameters
-
map | The map to get the collision maps from |
The documentation for this class was generated from the following files:
- C:/Users/Will/Documents/Programs/LPCGame/src/core/entitymanager.h
- C:/Users/Will/Documents/Programs/LPCGame/src/core/entitymanager.cpp