Ejemplo n.º 1
0
        protected override JobHandle OnUpdate(JobHandle inputDeps)
        {
            var job = new BulletJob {
                deltaTime = Time.deltaTime
            };

            return(job.Schedule(this, inputDeps));
        }
Ejemplo n.º 2
0
        protected override JobHandle OnUpdate(JobHandle inputDeps)
        {
            var topGroup = World.GetExistingSystem <ServerSimulationSystemGroup>();
            var job      = new BulletJob {
                deltaTime = topGroup.UpdateDeltaTime
            };

            return(job.Schedule(this, inputDeps));
        }
Ejemplo n.º 3
0
        protected override JobHandle OnUpdate(JobHandle inputDeps)
        {
            var predictionGroup = World.GetExistingSystem <GhostPredictionSystemGroup>();
            var job             = new BulletJob {
                tick = predictionGroup.PredictingTick, deltaTime = Time.DeltaTime
            };

            return(job.Schedule(this, inputDeps));
        }
Ejemplo n.º 4
0
        protected override JobHandle OnUpdate(JobHandle inputDeps)
        {
            var bulletJob = new BulletJob {
                commandBuffer = barrier.CreateCommandBuffer().ToConcurrent(), deltaTime = Time.deltaTime
            };
            var handle = bulletJob.Schedule(this, inputDeps);

            barrier.AddJobHandleForProducer(handle);
            return(handle);
        }
Ejemplo n.º 5
0
        protected override JobHandle OnUpdate(JobHandle inputDeps)
        {
            var topGroup  = World.GetExistingSystem <ServerSimulationSystemGroup>();
            var bulletJob = new BulletJob {
                commandBuffer = barrier.CreateCommandBuffer().ToConcurrent(), deltaTime = topGroup.UpdateDeltaTime
            };
            var handle = bulletJob.Schedule(this, inputDeps);

            barrier.AddJobHandleForProducer(handle);
            return(handle);
        }
Ejemplo n.º 6
0
        protected override JobHandle OnUpdate(JobHandle inputDeps)
        {
            var bulletJob = new BulletJob
            {
                CommandBuffer = endSimulationEntityCommandBufferSystem.CreateCommandBuffer().ToConcurrent()
            };

            var bulletJobHandle = bulletJob.Schedule(this, inputDeps);

            endSimulationEntityCommandBufferSystem.AddJobHandleForProducer(bulletJobHandle);
            return(bulletJobHandle);
        }
Ejemplo n.º 7
0
    protected override JobHandle OnUpdate(JobHandle inputDeps)
    {
        var topGroup = World.GetExistingSystem <ClientSimulationSystemGroup>();
        var job      = new BulletJob
        {
            targetTick         = m_NetworkTimeSystem.predictTargetTick,
            deltaTime          = topGroup.UpdateDeltaTime,
            snapshotFromEntity = GetBufferFromEntity <BulletSnapshotData>()
        };

        return(job.Schedule(this, inputDeps));
    }
Ejemplo n.º 8
0
    protected override void OnUpdate()
    {
        var translationType     = GetArchetypeChunkComponentType <Translation>();
        var bulletComponentType = GetArchetypeChunkComponentType <BulletComponent>();
        var entityType          = GetArchetypeChunkEntityType();

        var job = new BulletJob
        {
            deltaTime           = Time.DeltaTime,
            commandBuffer       = barrier.CreateCommandBuffer().ToConcurrent(),
            bulletComponentType = bulletComponentType,
            translationType     = translationType,
            entityType          = entityType,
        };

        Dependency = job.Schedule(group, Dependency);
        barrier.AddJobHandleForProducer(Dependency);
    }
Ejemplo n.º 9
0
        protected override JobHandle OnUpdate(JobHandle inputDeps)
        {
            //return new JobHandle();
            ///*
            if (bulletsQuery.CalculateEntityCount() == 0)
            {
                return(new JobHandle());
            }
            BulletJob job = new BulletJob
            {
                time            = UnityEngine.Time.time,
                bullets         = bulletsQuery.ToComponentDataArray <ZoxID>(Allocator.TempJob), //bullets.AsDeferredJobArray(),
                bulletPositions = bulletsQuery.ToComponentDataArray <Translation>(Allocator.TempJob),
            };
            JobHandle handle = job.Schedule(this, inputDeps);

            handle.Complete();

            job.bullets.Dispose();
            job.bulletPositions.Dispose();
            return(handle);
            //*/
        }