module gedo.system.scene;



public class Scene
{
public:
	Scene nextScene()
	{
		return _nextScene;
	}


	void start()
	{
		_nextScene = null;
	}


	void end()
	{
	}


	void update()
	{
	}


	void draw()
	{
	}


protected:
	Scene _nextScene;
}



alias void delegate(PauseScene) OnPauseSceneUpdate;



public class PauseScene : Scene
{
public:
	this(Scene parent, OnPauseSceneUpdate dg)
	{
		_parent = parent;
		_dg     = dg;
	}


	void resume()
	{
		_nextScene = _parent;
	}


	override void update()
	{
		_dg(this);
	}


	override void draw()
	{
		_parent.draw();
	}


private:
	OnPauseSceneUpdate _dg;
	Scene              _parent;
}
