Skip to main content

ParticleSystemToHand

A class in Root.Township, the global namespace.

Client-side effect that pulls a particle system's particles towards the local player's hands, alternating left and right, and kills them on arrival.

Constructors​

MemberWhat it is
ParticleSystemToHand()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private ParticleSystem editingParticleSystemThe particle system whose particles are moved.
private ParticleSystem.Particle[] particlesBuffer of up to 64 particles read from the system.
private AnimationCurve speedOverLifetimeSpeed towards the hand, by particle remaining lifetime.

Methods​

2 private and internal methods
MemberWhat it is
private void MoveParticle(Vector3 targetPosition, int startingIndex, int particleCount)Moves every other particle towards the target hand, killing those that get within about 0.3 m.
private void Update()Plays the system while there is a local player and moves the particles to the grip points.