CommandBuffer
CommandBuffer, to record operations and play them back at any time.
Example
// Our dwarf
var dwarf = world.Create(new Dwarf(), new Position(), new Velocity());
// Buffering actions on entities to play them back later
var commandBuffer = new CommandBuffer();
commandBuffer.Add(dwarf, new Pickaxe();
commandBuffer.Set(dwarf, new Position(10,10);
// Buffering a whole entity
var nonExistingDwarf = commandBuffer.Create(new Signature(typeof(Dwarf), typeof(Position), typeof(Velocity));
commandBuffer.PlayBack(world, disposal = true);Last updated