protected override JobHandle OnUpdate(JobHandle inputDeps)
    {
        var systemJob = new OrbitJob {
            _deltaTime = Time.deltaTime
        };
        var handle = systemJob.Schedule(this, inputDeps);

        return(handle);
    }
Ejemplo n.º 2
0
    private void Update()
    {
        var movementJob = new OrbitJob()
        {
            _deltaTime           = Time.deltaTime,
            _speeds              = _nativeStarSpeeds,
            _axis                = _orbitAxis,
            _targetPosition      = transform.position,
            _distancesFromCenter = _nativeDistancesFromCenter
        };

        var handle = movementJob.Schedule(_transformAccessArray);

        handle.Complete();
    }