示例#1
0
文件: MoveSystem.cs 项目: senchov/ECS
    protected override JobHandle OnUpdate(JobHandle inputDeps)
    {
        var job = new MoveSystemJob();

        job.DeltaTime = Time.deltaTime;
        return(job.Schedule(this, inputDeps));
    }
示例#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));
    }
示例#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);
        }
示例#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);
    }
示例#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));
    }
示例#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));
        }