Documentation for C++/SDL 2.0 Tile Engine
Making a simple tile based engine
 All Classes Namespaces Functions Variables Enumerations
Public Member Functions | List of all members
GameObjectEditor Class Reference

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)
- Public Member Functions inherited from GameObjectManager
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

- Protected Attributes inherited from GameObjectManager
GameObjectList mGameObjects
 The list of objects in the scene.
std::shared_ptr< CameramCamera

Detailed Description

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

Member Function Documentation

void GameObjectEditor::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 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?

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


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