public void RemoveParticleSystem(ParticleSystemBase particleSystem) { if (particleSystem.SubsystemParticles == this) { particleSystem.OnRemoved(); m_particleSystems.Remove(particleSystem); particleSystem.SubsystemParticles = null; return; } throw new InvalidOperationException("Particle system is not added."); }
public void AddParticleSystem(ParticleSystemBase particleSystem) { if (particleSystem.SubsystemParticles == null) { m_particleSystems.Add(particleSystem, value: true); particleSystem.SubsystemParticles = this; particleSystem.OnAdded(); return; } throw new InvalidOperationException("Particle system is already added."); }
public bool ContainsParticleSystem(ParticleSystemBase particleSystem) { return(particleSystem.SubsystemParticles == this); }