protected override JobHandle OnUpdate(JobHandle inputDeps) { inputDeps = new AMJob { hpModifyFromEntity = GetBufferFromEntity <ActorAttribute3Modifys <_HP> >(), endCommandBuffer = endBarrier.CreateCommandBuffer().ToConcurrent(), } .ScheduleSingle(this, inputDeps); endBarrier.AddJobHandleForProducer(inputDeps); return(inputDeps); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { inputDeps = new AMJob { random = new Unity.Mathematics.Random((uint)UnityEngine.Random.Range(1, int.MaxValue)), translationFromEntity = GetComponentDataFromEntity <Translation>(true), hpModifyFromEntity = GetBufferFromEntity <ActorAttribute3Modifys <_HP> >(), endCommandBuffer = endBarrier.CreateCommandBuffer().ToConcurrent(), } .ScheduleSingle(this, inputDeps); endBarrier.AddJobHandleForProducer(inputDeps); return(inputDeps); }