Documentation for C++/SDL 2.0 Tile Engine
Making a simple tile based engine
|
Allows for editing of the GameObjects on a map. More...
#include <gameobjecteditor.h>
Inherits GameObjectManager.
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 game objects. | |
virtual void | Move (float deltaT) |
void | SetCollisionMaps (Map *map) |
void | Register (std::shared_ptr< GameObject > obj) |
void | Register (std::shared_ptr< Camera > camera) |
virtual void | CheckMouseEvents () |
virtual void | HandleMouseEvent (const SDL_MouseMotionEvent &mouseEvent) |
Json::Value | Save () |
Additional Inherited Members | |
![]() | |
GameObjectList | mGameObjects |
The list of objects in the scene. | |
std::shared_ptr< Camera > | mCamera |
Allows for editing of the GameObjects on a map.
Lets you add/remove GameObjects to a map along with allowing for sending mouse input to the MapEditor
|
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 GameObjectManager.
void GameObjectEditor::Register | ( | std::shared_ptr< MapEditor > | mapEditor | ) |
Register the MapEditor with the GameObjectEditor so that it can recieve mouse input TODO: How will I get the selected tile from the UI?
mapEditor | The MapEditor to register |
void GameObjectEditor::Register | ( | TileBar * | tileBar | ) |
Register the TileBar with the GameObjectEditor so that we can get selected object from the bar for insertion into the map