alecmce/xember — Issue #14: If two entities reference the same component, then when encoded and decoded identity must be preserved
Author: alecmce
Created: 2011-10-24 02:04:33+00:00
State: open

In a scenario where entity A and B share a component World:

world = new World();
entityA.addComponent(world);
entityB.addComponent(world);

then you encode

encodedA = encoder.encode(entityA);
encodedB = encoder.encode(entityB);

then you decode

entityA = decoder.decode(encodedA);
entityB = decoder.decode(encodedB);

unfortunately

trace(entityA.getComponent(World) == entityB.getComponent(World)) // outputs false

boo!