Skip to content

Instantly share code, notes, and snippets.

@Symphonym
Created June 22, 2014 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Symphonym/cca0edabba9e8880d86d to your computer and use it in GitHub Desktop.
Save Symphonym/cca0edabba9e8880d86d to your computer and use it in GitHub Desktop.
class Game
{
public:
// ... game loop functions and createX functions for scenes, systems and entities
// as well as functions like running a lua script in the global lua environment
EntityPool& getEntityPool();
ScenePool& getScenePool();
SystemPool& getSystemPool();
MessageCentral& getMessageCentral();
LuaEnvironment& getLua();
Window& getWindow();
private:
// The Game class ends up being a bag for everything in the engine, which feels like bad design
EntityPool m_entityPool;
ScenePool m_scenePool
SystemPool m_scenePool;
MessageCentral m_msgCentral;
LuaEnvironment m_lua;
Window m_window;
}
@EllisBarnes00
Copy link

Nice m8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment