Beispiel #1
0
        protected override void OnUpdate()
        {
            var agentData       = query.ToComponentDataArray <NavigationData>(Allocator.TempJob);
            var translationData = query.ToComponentDataArray <Translation>(Allocator.TempJob);
            var entityArray     = query.ToEntityArray(Allocator.TempJob);

            Entities.ForEach((Entity entity, ref Translation translation, ref NavigationData data) =>
            {
                ORCAVelocityCalculationDOTS.ComputeNewVelocity(ref data, translation, entity, agentData, translationData, entityArray,
                                                               simulatorTimeStep, maxDistance);

                agentData.Dispose();
                translationData.Dispose();
                entityArray.Dispose();
            });
        }
Beispiel #2
0
 public void Execute(Entity entity, int index, ref Translation tr, ref NavigationData agent)
 {
     ORCAVelocityCalculationDOTS.ComputeNewVelocity(ref agent, tr, entity, Agents, Translations, Entities, SimulatorTimeStep, MaxDistance);
 }