protected override JobHandle OnUpdate(JobHandle inputDeps) { JobHandle jobHandle = new TriggerCollisonCheckJob { enemies = GetComponentDataFromEntity <UnitEnemy>(true) }.Schedule(_stepPhysicsWorldSystem.Simulation, ref _buildPhysicsWorldSystem.PhysicsWorld, inputDeps); return(jobHandle); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { JobHandle jobHandle = new TriggerCollisonCheckJob { Enemies = GetComponentDataFromEntity <UnitEnemy>(true), Projectiles = GetComponentDataFromEntity <ProjectileData>(true), AllSystemsHealthData = GetComponentDataFromEntity <HealthData>(), EntityCommandBuffer = _commandBufferSystem.CreateCommandBuffer() }.Schedule(_stepPhysicsWorldSystem.Simulation, ref _buildPhysicsWorldSystem.PhysicsWorld, inputDeps); _commandBufferSystem.AddJobHandleForProducer(jobHandle); return(jobHandle); }