Ejemplo n.º 1
0
    protected override JobHandle OnUpdate(JobHandle inputDeps)
    {
        var job = new MoveBall {
        };

        return(job.Schedule(this, inputDeps));
    }
Ejemplo n.º 2
0
    protected override JobHandle OnUpdate(JobHandle inputDeps)
    {
        var job = new MoveBall {
            forceAppliedMult = PlayTimeSettings.forceAppliedMult, forceMult = PlayTimeSettings.forceMult
        };


        return(job.Schedule(this, inputDeps));
    }
Ejemplo n.º 3
0
    protected override JobHandle OnUpdate(JobHandle inputDeps)
    {
        EntityCommandBuffer entityOriginsCommandBuffer = new EntityCommandBuffer(Allocator.TempJob, PlaybackPolicy.SinglePlayback);

        Entities.WithNone <BallOriginalTranslation>().ForEach((Entity entity, Translation translation, SphereId sphereId) =>
        {
            entityOriginsCommandBuffer.AddComponent(entity, new BallOriginalTranslation {
                Value = translation.Value
            });
        }).Run();
        entityOriginsCommandBuffer.Playback(EntityManager);
        entityOriginsCommandBuffer.Dispose();

        var moveBallJob = new MoveBall
        {
            TranslationType             = GetArchetypeChunkComponentType <Translation>(),
            BallOriginalTranslationType = GetArchetypeChunkComponentType <BallOriginalTranslation>(true),
            LastSystemVersion           = LastSystemVersion,
            ElapsedTime = Time.ElapsedTime
        };
        var moveBallJobHandle = moveBallJob.Schedule(m_Group, inputDeps);

        return(moveBallJobHandle);
    }