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; }
public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { playerView = animator.GetComponent <PlayerView>(); playerView.PlayerAllowJump(); EmitDustTrail(animator); }