void WriteBacklog(List <EntityChange> changes) { foreach (var id in destroyedEntitiesBacklog) { changes.Add(EntityChange.MakeRemoval(id)); } destroyedEntitiesBacklog.Clear(); }
EntityChange MakeChangeOf(GameEntity e) { if (e.flagDestroy) { return(EntityChange.MakeRemoval(e.id.value)); } var componentChanges = MakeComponentChangesOf(e); return(EntityChange.MakeUpdate(e.id.value, componentChanges)); }