protected override JobHandle OnUpdate(JobHandle inputDependencies) { var job = new MovePlayerCursorJob { DeltaTime = Time.deltaTime, CommandBuffer = m_EntityCommandBufferSystem.CreateCommandBuffer().ToConcurrent() }.Schedule(m_PlayerQuery, inputDependencies); m_EntityCommandBufferSystem.AddJobHandleForProducer(job); return(job); }
protected override JobHandle OnUpdate(JobHandle inputDependencies) { LbBoard board = m_BoardQuery.GetSingleton <LbBoard>(); var sRand = new System.Random(); var job = new MovePlayerCursorJob { Seed = sRand.Next(int.MaxValue), Size = board.SizeY, CommandBuffer = m_EntityCommandBufferSystem.CreateCommandBuffer().ToConcurrent() }.Schedule(m_PlayerQuery, inputDependencies); m_EntityCommandBufferSystem.AddJobHandleForProducer(job); return(job); }