示例#1
0
    protected override JobHandle OnUpdate(JobHandle inputDependencies)
    {
        var job = new MouveSystemJob()
        {
            Translation               = GetArchetypeChunkComponentType <Translation>(false),
            TrackedTargetReference    = GetArchetypeChunkComponentType <TrackedTargetReference>(true),
            OtherEntitiesLocalToWorld = GetComponentDataFromEntity <LocalToWorld>(true)
        };


        // Now that the job is set up, schedule it to be run.
        return(job.Schedule(m_Query, inputDependencies));
    }
示例#2
0
    protected override JobHandle OnUpdate(JobHandle inputDependencies)
    {
        var job = new MouveSystemJob()
        {
            Velocity  = GetArchetypeChunkComponentType <PhysicsVelocity>(false),
            Mass      = GetArchetypeChunkComponentType <PhysicsMass>(false),
            Direction = GetArchetypeChunkComponentType <MovementDirection>(true),
            Speed     = GetArchetypeChunkComponentType <MovementSpeed>(true)
        };


        // Now that the job is set up, schedule it to be run.
        return(job.Schedule(m_Query, inputDependencies));
    }