LPCGame
A Simple 2d Game Engine
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
entityeditor.h
1 #ifndef ENTITYEDITOR_H
2 #define ENTITYEDITOR_H
3 
4 #include <vector>
5 #include <memory>
6 #include "external/json/json.h"
7 #include "camera.h"
8 #include "entity.h"
9 #include "entitymanager.h"
10 #include "mapeditor.h"
11 #include "tilebar.h"
12 
14 
19 class EntityEditor : public EntityManager {
20 public:
21  EntityEditor();
22  ~EntityEditor();
24  void Update();
31  void Register(std::shared_ptr<MapEditor> mapEditor);
37  void Register(TileBar* tileBar);
43  void HandleMouseEvent(const SDL_MouseButtonEvent &mouseEvent);
44 
45 private:
46  std::weak_ptr<MapEditor> mMapEditor;
47  //We use a non-managed pointer because we don't want to have to make
48  //a shared tilebar pointer b/c it's managed as a GameObject shared ptr with
49  //the ui object manager
50  TileBar* mTileBar;
51 };
52 
53 #endif