X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgame%2Fdirector.cpp;h=53b2e7f9a3a0c8668580a139355133eebe7b3f61;hb=f377d216dfc44e36da3697557f38dfedcbec45d1;hp=4a4c1265e82d12ba897f65f1879b8db8f6b7ac33;hpb=47767a381e6bdde03f68efdfc1d8e628c3655019;p=libs%2Fgame.git diff --git a/source/game/director.cpp b/source/game/director.cpp index 4a4c126..53b2e7f 100644 --- a/source/game/director.cpp +++ b/source/game/director.cpp @@ -1,6 +1,8 @@ #include "director.h" #include #include +#include "component.h" +#include "entity.h" #include "stage.h" using namespace std; @@ -14,6 +16,9 @@ Director::Director(DataFile::Collection &r): #if DEBUG access_guard.emplace(); #endif + + reflector.get_or_create_class().set_polymorphic_base(); + reflector.get_or_create_class().set_polymorphic_base(); } // Hide ~unique_ptr from the header @@ -22,7 +27,7 @@ Director::~Director() Stage &Director::create_stage() { - stages.emplace_back(std::make_unique(std::ref(resources))); + stages.emplace_back(std::make_unique(std::ref(reflector), std::ref(resources))); event_source.emit(std::ref(*stages.back())); return *stages.back(); }