This works:
var parent = new Sprite();
parent .x._ = 250;
parent .y._ = 0;
var child = new Sprite();
new Entity().add(parent);
parent.owner.addChild(new Entity().add(child));
This does not, result is child is at 0,0 to stage:
var ent = new Entity();
var parent = new Sprite();
parent .x._ = 250;
parent .y._ = 0;
var child = new Sprite();
ent.add(parent);
ent.addChild(new Entity().add(child));
The second code also fails when calling disposeChildren() on the parent entity.
I would think that the two code blocks would result in the same behavior, but seems like I have to call addChild on the child sprite owner rather than directly on the entity
AND I KNOW WHAT I DID:
the parent entity was actually a child of another entity. And I saved reference at that point:
var ent = grandParent.addChild(new Entity());
This set ent to grandParent, not the entity being added.