LPCGame
A Simple 2d Game Engine
|
A state for running a game level. More...
#include <gamestate.h>
Inherits State.
Public Member Functions | |
std::string | Run () |
Json::Value | Save () |
void | Load (Json::Value val) |
![]() | |
void | SetExit (std::string val) |
void | UnsetExit () |
Set exit to false. | |
std::shared_ptr< EntityManager > | Manager () |
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. | |
![]() | |
virtual void | LogicUpdate () |
virtual void | RenderUpdate () |
Call the script's RenderUpdate function. | |
Additional Inherited Members | |
![]() | |
std::shared_ptr< EntityManager > | mManager |
std::shared_ptr< Camera > | mCamera |
std::string | mName |
bool | mExit |
std::string | mExitCode |
LuaScript | mScript |
The state's script. | |
A state for running a game level.
A simple game state that can run a level of the game
|
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.
|
virtual |
Load the state data from a json value
val | The Json::Value containing the data to load |
Reimplemented from State.
|
virtual |
|
virtual |
Write the state data to a Json Value and return it so that it can be saved and loaded later
Reimplemented from State.