Exemple #1
0
    protected override JobHandle OnUpdate(JobHandle inputDeps)
    {
        var job = new MoveSystemJob();

        job.DeltaTime = Time.deltaTime;
        return(job.Schedule(this, inputDeps));
    }
Exemple #2
0
    protected override JobHandle OnUpdate(JobHandle inputDependencies)
    {
        var job = new MoveSystemJob
        {
            deltaTime = UnityEngine.Time.deltaTime
        };

        // Now that the job is set up, schedule it to be run.
        return(job.Schedule(this, inputDependencies));
    }
Exemple #3
0
        protected override JobHandle OnUpdate(JobHandle inputDeps)
        {
            var job = new MoveSystemJob
            {
                deltaTime   = Time.deltaTime,
                DotsHighway = Highway.instance.DotsHighway
            };
            var deps = job.Schedule(this, inputDeps);

            DotsHighway.RegisterReaderJob(deps);
            return(deps);
        }
Exemple #4
0
    protected override JobHandle OnUpdate(JobHandle inputDependencies)
    {
        EntityQuery          entityQuery = GetEntityQuery(typeof(Unit));
        NativeArray <Entity> units       = entityQuery.ToEntityArray(Allocator.TempJob);
        MoveSystemJob        moveJob     = new MoveSystemJob {
            units = units
        };
        JobHandle job = moveJob.Schedule(this, inputDependencies);

        this.endSimulationEntityCommandBufferSystem.AddJobHandleForProducer(job);
        return(job);
    }
Exemple #5
0
    protected override JobHandle OnUpdate(JobHandle inputDependencies)
    {
        var job = new MoveSystemJob();

        // Assign values to the fields on your job here, so that it has
        // everything it needs to do its work when it runs later.
        // For example,
        job.deltaTime = UnityEngine.Time.deltaTime;



        // Now that the job is set up, schedule it to be run.
        return(job.Schedule(this, inputDependencies));
    }
Exemple #6
0
        protected override JobHandle OnUpdate(JobHandle inputDeps)
        {
            var inputType = GetArchetypeChunkComponentType <InputComponent>(true);
            var moveType  = GetArchetypeChunkComponentType <Translation>(false);

            var job = new MoveSystemJob()
            {
                InputComponent = inputType,
                Translation    = moveType,
                DeltaTime      = Time.deltaTime
            };

            return(job.Schedule(m_Group, inputDeps));
        }
    protected override JobHandle OnUpdate(JobHandle inputDeps)
    {
        var gameDataEntity = GetSingletonEntity <GameData>();
        var gameData       = EntityManager.GetComponentData <GameData>(gameDataEntity);

        if (gameData.IsGameFinished)
        {
            return(inputDeps);
        }

        var jobHandle = new MoveSystemJob()
        {
            deltaTime = Time.DeltaTime
        }.Schedule(this, inputDeps);

        return(jobHandle);
    }