Non-pipeline component programming

Mike Parker aldacron at gmail.com
Fri Feb 7 00:09:16 PST 2014


On 2/7/2014 12:14 AM, Paul Freund wrote:
>
> You're example almost works. With the EntityComponentManager API it
> works like this:
>
>          auto shipEntities = ecm.query!SpaceShip();
>
>          foreach (i, spaceship; taskPool.parallel(shipEntities))
>          {
>              auto shipData = spaceship.getComponent!SpaceShip();
>              shipData.name = format("Ship %i", i);
>          }
>
> Now that unittests are written, documentation is on its way and should
> be ready in a few days.

Ah, so there's no data-orientation here. It's strictly entity-centric. 
Or do you have a way to iterate components independently of entities?


More information about the Digitalmars-d mailing list