protected override JobHandle OnUpdate(JobHandle inputDeps) { var job = new DamageJob { }; return(job.Schedule(this, inputDeps)); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var damageJob = new DamageJob { healthGroup = GetComponentDataFromEntity <HealthData>(), attackDamageGroup = GetComponentDataFromEntity <AttackDamageData>(), attackReadyTagGroup = GetComponentDataFromEntity <AttackReadyTag>(), deltaTime = Time.DeltaTime }; return(damageJob.Schedule(stepPhysicsWorld.Simulation, ref buildPhysicsWorld.PhysicsWorld, inputDeps)); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var job = new DamageJob { Ecb = barrier.CreateCommandBuffer().ToConcurrent(), Dead = GetComponentDataFromEntity <DEAD>(), DeltaTime = Time.DeltaTime }; inputDeps = job.Schedule(this, inputDeps); barrier.AddJobHandleForProducer(inputDeps); return(inputDeps); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var damageHandle = new DamageJob { Chunks = this._healthGroup.CreateArchetypeChunkArray(Allocator.TempJob), EntityType = this.GetArchetypeChunkEntityType(), HealthComponentType = this.GetArchetypeChunkComponentType <HealthComponent>(), InCutsceneComponentType = this.GetArchetypeChunkComponentType <InCutsceneComponent>() }.Schedule(this, inputDeps); var cleanUphandle = new CleanUpJob { CommandBuffer = this._endFrameBarrier.CreateCommandBuffer().ToConcurrent(), }.Schedule(this, damageHandle); this._endFrameBarrier.AddJobHandleForProducer(cleanUphandle); return(cleanUphandle); }