public JobHandle Execute(JobHandle _jobHandle) { var doofusesEntityGroups = entitiesDB.QueryEntities <PositionEntityComponent, VelocityEntityComponent, SpeedEntityComponent>( GameGroups.DOOFUSES_EATING.Groups); foreach (var(doofuses, _) in doofusesEntityGroups) { var buffers = doofuses.ToBuffers(); var dep = new ComputePostionFromVelocityJob(buffers, Time.deltaTime).ScheduleParallel( buffers.count, _jobHandle); _jobHandle = JobHandle.CombineDependencies(_jobHandle, dep); } return(_jobHandle); }
public JobHandle Execute(JobHandle _jobHandle) { FasterList <ExclusiveGroupStruct> groupsToUpdate = GroupCompound <GameGroups.DOOFUSES, GameGroups.EATING> .Groups; var doofusesEntityGroups = entitiesDB.QueryEntities <PositionEntityComponent, VelocityEntityComponent, SpeedEntityComponent>( groupsToUpdate); foreach (var doofuses in doofusesEntityGroups.groups) { var dep = new ComputePostionFromVelocityJob(doofuses.ToFast(), Time.deltaTime).ScheduleParallel( doofuses.count, _jobHandle); _jobHandle = JobHandle.CombineDependencies(_jobHandle, dep); } return(_jobHandle); }