#include "entity.h"
#include "component.h"
#include "root.h"
+#include "transform.h"
using namespace std;
namespace Msp::Game {
-Entity::Entity(Handle<Entity> p):
+Entity::Entity(Handle<Entity> p, TransformTag):
parent(p)
{ }
+Entity::Entity(Handle<Entity> p, const TransformValues &tv):
+ parent(p),
+ transform(*this)
+{
+ transform->set_values(tv);
+}
+
+// Hide ~Owned<Transform> from the header
+Entity::~Entity()
+{ }
+
void Entity::add_component(Handle<Component> comp)
{
if(comp->get_entity().get()!=this)