protected override JobHandle OnUpdate(JobHandle inputDeps) { var calculateMoveStepJob = new CalculateAgentMoveStep() { AgentData = agentGroup.AgentData, AgentGoals = agentGroup.AgentGoal, AgentPos = agentGroup.Position, AgentStep = agentGroup.AgentStep, AgentTotalW = totalWeightSystem.AgentTotalMarkerWeight, AgentMarkersMap = markerSystem.AgentMarkers, Counter = agentGroup.Counter }; var calculateMoveStepDeps = calculateMoveStepJob.Schedule(agentGroup.Length, Settings.BatchSize, inputDeps); calculateMoveStepDeps.Complete(); return(calculateMoveStepDeps); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { if (Settings.experiment.BioCloudsEnabled) { var calculateMoveStepJob = new CalculateAgentMoveStepCloudCohesion() { AgentData = agentGroup.AgentData, AgentGoals = agentGroup.AgentGoal, AgentPos = agentGroup.Position, AgentStep = agentGroup.AgentStep, AgentTotalW = totalWeightSystem.AgentTotalMarkerWeight, AgentMarkersMap = markerSystem.AgentMarkers, BioCloudsCell2OwningCloudMap = m_BioCloudsCellMarkSystem.Cell2OwningCloud, BioClouds2PosMap = m_BioCloudsCellTagSystem.cloudIDPositions, AgentCloudID = agentGroup.AgentCloudID }; var calculateMoveStepDeps = calculateMoveStepJob.Schedule(agentGroup.Length, Settings.BatchSize, inputDeps); calculateMoveStepDeps.Complete(); return(calculateMoveStepDeps); } else { var calculateMoveStepJob = new CalculateAgentMoveStep() { AgentData = agentGroup.AgentData, AgentGoals = agentGroup.AgentGoal, AgentPos = agentGroup.Position, AgentStep = agentGroup.AgentStep, AgentTotalW = totalWeightSystem.AgentTotalMarkerWeight, AgentMarkersMap = markerSystem.AgentMarkers, AgentCloudID = agentGroup.AgentCloudID }; var calculateMoveStepDeps = calculateMoveStepJob.Schedule(agentGroup.Length, Settings.BatchSize, inputDeps); calculateMoveStepDeps.Complete(); return(calculateMoveStepDeps); } }