private void ExecuteForGroup(IReadOnlyList <IEntity> entities, IReactToGroupSystem castSystem, bool runParallel = false) { if (runParallel) { _threadHandler.For(0, entities.Count, i => { castSystem.Process(entities[i]); }); return; } for (var i = entities.Count - 1; i >= 0; i--) { castSystem.Process(entities[i]); } }
private static void ExecuteForGroup(IEnumerable <IEntity> entities, IReactToGroupSystem castSystem) { foreach (var entity in entities) { castSystem.Process(entity); } }