/// <summary> /// Starts the timer job. /// </summary> private void StartTimerJob() { timerJob = new TimerJob { StartTime = 0, MaxTime = timeLimit[currentLevel] }; timerHandle = timerJob.Schedule(); JobHandle.ScheduleBatchedJobs(); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var job = new TimerJob { DeltaTime = Time.deltaTime, Entity = _group.Entity, Timer = _group.Timer, CommandBuffer = _timerSystemBarrier.CreateCommandBuffer(), }; return(job.Schedule(inputDeps)); }