LPCGame
A Simple 2d Game Engine
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
EntityEditor Class Reference

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)
 
- Public Member Functions inherited from EntityManager
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< EntityGetEntity (const std::string &name)
 
virtual void CheckMouseEvents ()
 
virtual void HandleMouseEvent (const SDL_MouseMotionEvent &mouseEvent)
 
Json::Value Save ()
 
void PrintSharedPtrCount ()
 

Additional Inherited Members

- Protected Attributes inherited from EntityManager
EntityList mEntities
 The list of entities in the scene.
 
std::shared_ptr< CameramCamera
 

Detailed Description

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

Member Function Documentation

void EntityEditor::HandleMouseEvent ( const SDL_MouseButtonEvent &  mouseEvent)
virtual

Handle mouse clicks, run through the active game objects find what was clicked, and call it

Parameters
mouseEventThe 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?

Parameters
mapEditorThe 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


The documentation for this class was generated from the following files: