1.1.1
Features & Changes
- The
World
can now be modified during queries usingworld.Create
,world.Destroy
,world.Set
,world.Add
,world.Remove
. - Queries and Enumerators now iterate backwards over the entities.
- A new
CommandBuffer
-API is available which combines the previous ones. QueryDescription
now features a new API to reduce boilerplate :var desc = new QueryDescription().WithAll<Position, Velocity>...
.- Added
Arch.Samples
which provides a small usage sample with Arch and Monogame :) - Several small bug fixes and tweaks.
CommandBuffer
You no longer need several CommandBuffers, but a single one. The syntax is now much simpler.
var entity = world.Create<Transform, Rotation, int>();
var bufferedEntity = commandBuffer.Create(new ComponentType[] {typeof(Transform), typeof(Rotation), typeof(int) }); // Later also generic overloads to get rid of arrays.
commandBuffer.Set(in entity, new Transform{ X = 20, Y = 20});
commandBuffer.Add(in entity, new Ai());
commandBuffer.Set(in bufferedEntity, new Transform{ X = 20, Y = 20});
commandBuffer.Add(in bufferedEntity, new Ai());
commandBuffer.Playback();
Acknowledgement
Many thanks to @andreakarasho for fixes and new features ! :)