Пример #1
0
        private void OnAttractAether(ParticleSystem particleSystem, ParticleSystem.Particle[] particles, int particleCount, Transform targetTransform, PlayerView playerView)
        {
            ParticleTargetFulfillment particleTargetFulfillment = targetMapping[particleSystem];

            for (int i = 0; i < particleCount; ++i)
            {
                if (particles[i].lifetime >= 0 && (particles[i].position - targetTransform.position).magnitude < 1)
                {
                    particles[i].lifetime = -1;
                    particleTargetFulfillment.fulfilledParticleCount++;
                    aetherGainTrigger.Fire(playerView);
                }
            }

            targetMapping[particleSystem] = particleTargetFulfillment;
        }
Пример #2
0
 public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     playerView = animator.GetComponent <PlayerView>();
     playerView.PlayerAllowJump();
     EmitDustTrail(animator);
 }