protected override JobHandle OnUpdate(JobHandle inputDependencies) { ResetJumpCountSystemJob resetJumpCountJob = new ResetJumpCountSystemJob() { JumpCount = GetArchetypeChunkComponentType <JumpCount>(false) }; inputDependencies = resetJumpCountJob.Schedule(m_ResetJumpCountQuery, inputDependencies); JumpSystemJob jumpJob = new JumpSystemJob() { Velocity = GetArchetypeChunkComponentType <PhysicsVelocity>(false), JumpCount = GetArchetypeChunkComponentType <JumpCount>(false), JumpTrigger = GetArchetypeChunkComponentType <JumpTrigger>(false), JumpForce = GetArchetypeChunkComponentType <JumpForce>(true), MaxJumpCount = GetArchetypeChunkComponentType <MaxJumpCount>(true) }; // Now that the job is set up, schedule it to be run. return(jumpJob.Schedule(m_JumpQuery, inputDependencies)); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var job = new JumpSystemJob(); return(job.Schedule(this, inputDeps)); }