Ejemplo n.º 1
0
        protected override JobHandle OnUpdate(JobHandle deps)
        {
            var senseJob = new PedestrianMoveCheckJob()
            {
                WalkableArea    = _walkableArea,
                PedestrianData  = _pedestrianGroup.PedestrianData,
                TexelSize       = texelSize,
                PatchResolution = patchResolution,
                DeltaTime       = Time.deltaTime,
                RdGen           = new Random(_randSeed[(Time.frameCount % _capacity)])
            };

            deps = senseJob.Schedule(_capacity, 64, deps);

            var stateJob = new PedestrianStateMachineJob()
            {
            };

            deps = stateJob.Schedule(_capacity, 64, deps);

            var moveJob = new PedestrianMoveJob()
            {
                Positions      = _pedestrianGroup.Position,
                Rotations      = _pedestrianGroup.Rotation,
                PedestrianData = _pedestrianGroup.PedestrianData
            };

            deps = moveJob.Schedule(_capacity, 64, deps);

            return(deps);
        }
Ejemplo n.º 2
0
        protected override JobHandle OnUpdate(JobHandle deps)
        {
            var senseJob = new PedestrianMoveCheckJob()
            {
                WalkableArea    = _walkableArea,
                TexelSize       = texelSize,
                PatchResolution = patchResolution,
                DeltaTime       = Time.DeltaTime,
                RdGens          = _rdGens
            };

            deps = senseJob.Schedule(this, deps);

            var stateJob = new PedestrianStateTransitionJob()
            {
                RdGens    = _rdGens,
                DeltaTime = Time.DeltaTime,
                PedestrianAnimStateConfig = _pedestrianAnimStateConfig
            };

            deps = stateJob.Schedule(this, deps);

            var moveJob = new PedestrianMoveJob();

            deps = moveJob.Schedule(this, deps);

            return(deps);
        }
Ejemplo n.º 3
0
        protected override JobHandle OnUpdate(JobHandle deps)
        {
            var senseJob = new PedestrianMoveCheckJob()
            {
                WalkableArea    = _walkableArea,
                TexelSize       = texelSize,
                PatchResolution = patchResolution,
                DeltaTime       = Time.deltaTime,
                RdGen           = new Random(_randSeed[(Time.frameCount % _capacity)])
            };

            deps = senseJob.Schedule(this, deps);

            var stateJob = new PedestrianStateTransitionJob()
            {
                RdGen     = new Random(_randSeed[(Time.frameCount % _capacity)]),
                DeltaTime = Time.deltaTime,
                PedestrianAnimStateConfig = _pedestrianAnimStateConfig
            };

            deps = stateJob.Schedule(this, deps);

            var moveJob = new PedestrianMoveJob();

            deps = moveJob.Schedule(this, deps);

            return(deps);
        }