LPCGame
A Simple 2d Game Engine
|
Allows for editing of the Entities on a map. More...
#include <entityeditor.h>
Inherits EntityManager.
Public Member Functions | |
void | Update () |
Update the objects. | |
void | Register (std::shared_ptr< MapEditor > mapEditor) |
void | Register (TileBar *tileBar) |
void | HandleMouseEvent (const SDL_MouseButtonEvent &mouseEvent) |
![]() | |
virtual void | Draw () |
Draw the entities. | |
virtual void | Move (float deltaT) |
void | SetCollisionMaps (Map *map) |
void | Register (std::shared_ptr< Entity > obj) |
void | Register (std::shared_ptr< Camera > camera) |
void | Remove (std::shared_ptr< Entity > entity) |
std::shared_ptr< Entity > | GetEntity (const std::string &name) |
virtual void | CheckMouseEvents () |
virtual void | HandleMouseEvent (const SDL_MouseMotionEvent &mouseEvent) |
Json::Value | Save () |
void | PrintSharedPtrCount () |
Additional Inherited Members | |
![]() | |
EntityList | mEntities |
The list of entities in the scene. | |
std::shared_ptr< Camera > | mCamera |
Allows for editing of the Entities on a map.
Lets you add/remove Entites to a map along with allowing for sending mouse input to the MapEditor TODO: Editor system should be re-thought
|
virtual |
Handle mouse clicks, run through the active game objects find what was clicked, and call it
mouseEvent | The mouse event that we're processing |
Reimplemented from EntityManager.
void EntityEditor::Register | ( | std::shared_ptr< MapEditor > | mapEditor | ) |
Register the MapEditor with the EntityEditor so that it can recieve mouse input TODO: How will I get the selected tile from the UI?
mapEditor | The MapEditor to register |
void EntityEditor::Register | ( | TileBar * | tileBar | ) |
Register the TileBar with the EntityEditor so that we can get selected object from the bar for insertion into the map