public virtual void addEffector(SSParticleEffector effector) { effector.reset(); if (effector.preAddHook != null) { for (int i = 0; i < _activeBlockLength; ++i) { if (isAlive(i)) { ushort effectorMask = (ushort)((int)_readElement(_effectorMasksHigh, i) << 8 | (int)_readElement(_effectorMasksLow, i)); if (effector.effectorMaskCheck(effectorMask)) { SSParticle particle = new SSParticle(); readParticle(i, particle); effector.preAddHook(particle); writeParticle(i, particle); } } } } _effectors.Add(effector); }
public virtual void addEffector(SSParticleEffector effector) { effector.reset(); _effectors.Add(effector); }