#include <msp/time/utils.h>
#include "demo.h"
+#include "stage.h"
using namespace std;
using namespace Msp;
delete music_source;
}
+void Demo::add_stage(const std::string &name, Stage &stage)
+{
+ things[name] = &stage;
+ things[name+".camera"] = static_cast<GL::Placeable *>(&stage.get_camera());
+}
+
void Demo::set_fixed_framerate(float fps)
{
frame_interval = Time::sec/fps;
#include "action.h"
#include "sequencer.h"
+class Stage;
+
class Demo
{
private:
Msp::DataFile::Collection &get_resources() const { return resources; }
Msp::GL::AnimationPlayer &get_animation_player() { return anim_player; }
+protected:
+ void add_stage(const std::string &, Stage &);
+public:
template<typename T>
T &get_thing(const std::string &);