Example #1
0
    /// <summary>
    /// Starts the timer job.
    /// </summary>
    private void StartTimerJob()
    {
        timerJob = new TimerJob
        {
            StartTime = 0,
            MaxTime   = timeLimit[currentLevel]
        };

        timerHandle = timerJob.Schedule();
        JobHandle.ScheduleBatchedJobs();
    }
Example #2
0
        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));
        }