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

Runs the editor state. More...

#include <editorstate.h>

Inherits State.

Public Member Functions

std::string Run ()
 
Json::Value Save ()
 
void Load (Json::Value val)
 
- Public Member Functions inherited from State
void SetExit (std::string val)
 
void UnsetExit ()
 Set exit to false.
 
std::shared_ptr< EntityManagerManager ()
 Get the State's EntityManager.
 
void SetName (std::string name)
 
std::string Name ()
 Get the state's name.
 

Protected Member Functions

void Init ()
 Initialize state memory.
 
void Free ()
 Free state memory.
 
- Protected Member Functions inherited from State
virtual void LogicUpdate ()
 
virtual void RenderUpdate ()
 Call the script's RenderUpdate function.
 

Additional Inherited Members

- Protected Attributes inherited from State
std::shared_ptr< EntityManagermManager
 
std::shared_ptr< CameramCamera
 
std::string mName
 
bool mExit
 
std::string mExitCode
 
LuaScript mScript
 The state's script.
 

Detailed Description

Runs the editor state.

Runs the editing state, which allows for map creation and addition or removal of gameobjects

Member Function Documentation

void EditorState::Init ( )
protectedvirtual

Initialize state memory.

The state's rendering thread, takes care of drawing all objects and providing framerate limiting condition variable notifications to all other threads NOT USED AT THE MOMENT The state's physics thread, takes care of updating and moving all objects and managing physics between the objects NOT USED AT THE MOMENT

Reimplemented from State.

void EditorState::Load ( Json::Value  val)
virtual

Load the state data from a Json::Value

See Also
State::Load for loading of inherited members
Parameters
valThe Json::Value containing the data to load

Reimplemented from State.

std::string EditorState::Run ( )
virtual

Run the state

Returns
The next state to run, returning quit exits program

Reimplemented from State.

Json::Value EditorState::Save ( )
virtual

Write the state data to a Json::Value and return it so it can be loaded later

See Also
State::Save for saving of inherited members
Returns
Json::Value containing the state's data

Reimplemented from State.


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