Skip to content

Instantly share code, notes, and snippets.

@Symphonym
Created June 22, 2014 14:46
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/2fecd6db4a1089790b28 to your computer and use it in GitHub Desktop.
Save Symphonym/2fecd6db4a1089790b28 to your computer and use it in GitHub Desktop.
#include <EntityPool.hpp>
#include <ScenePool.hpp>
Scene& Game::createScene(const std::string &name)
{
return m_scenePool->createScene(name);
}
Entity& Game::createEntity()
{
return m_entityPool->createEntity();
}
class EntityPool;
class ScenePool;
class Game
{
public:
Scene& createScene(const std::string &name);
Entity& createEntity();
private:
// Forward declare since the user doesn't need to know about them
std::unique_ptr<EntityPool> m_entityPool;
std::unique_ptr<ScenePool> m_scenePool;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment