示例#1
0
#pragma warning restore 649

    protected override JobHandle OnUpdate(JobHandle inputDeps)
    {
        var job = new PlayerHealthJob
        {
            Ecb = endFrameBarrier.CreateCommandBuffer().ToConcurrent(),
            HealthUpdatedArchetype = healthUpdatedArchetype,
            Dead = GetComponentDataFromEntity <DeadData>()
        };

        return(job.Schedule(this, inputDeps));
    }
示例#2
0
    protected override JobHandle OnUpdate(JobHandle inputDeps)
    {
        var job = new PlayerHealthJob
        {
            Ecb = barrier.CreateCommandBuffer().ToConcurrent(),
            HealthUpdatedArchetype = healthUpdatedArchetype,
            Dead = GetComponentDataFromEntity <DeadData>()
        };

        inputDeps = job.Schedule(this, inputDeps);
        inputDeps.Complete();
        barrier.AddJobHandleForProducer(inputDeps);
        return(inputDeps);
    }