public void Stop() { ParticleSystem.Stop(true, ParticleSystemStopBehavior.StopEmittingAndClear); gameObject.SetActive(false); Despawn?.Invoke(this); Despawn = null; EffectPool <ExplosionEffect> .Return(this); }
public void Stop() { InParticles.Stop(true, ParticleSystemStopBehavior.StopEmittingAndClear); foreach (var part in LongParticles) { part.Stop(true, ParticleSystemStopBehavior.StopEmittingAndClear); } gameObject.SetActive(false); Despawn?.Invoke(this); Despawn = null; Pool <RailgunEffectComp> .Return(this); }