X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgame%2Fentity.cpp;h=3c507a312bcb3e73d5d3500c246c0ab14c01a79f;hb=239cd38de0ddbb5931151523530a5e7272e16f7f;hp=055c8d63d4dde384c6f3e4cead73b770a76b8c79;hpb=c7d0e1aff305778f97974b329826628966380158;p=libs%2Fgame.git diff --git a/source/game/entity.cpp b/source/game/entity.cpp index 055c8d6..3c507a3 100644 --- a/source/game/entity.cpp +++ b/source/game/entity.cpp @@ -1,15 +1,27 @@ #include "entity.h" #include "component.h" #include "root.h" +#include "transform.h" using namespace std; namespace Msp::Game { -Entity::Entity(Handle p): +Entity::Entity(Handle p, TransformTag): parent(p) { } +Entity::Entity(Handle p, const TransformValues &tv): + parent(p), + transform(this) +{ + transform->set_values(tv); +} + +// Hide ~Owned from the header +Entity::~Entity() +{ } + void Entity::add_component(Handle comp) { if(comp->get_entity().get()!=this)