private void RemoveParticleSystem() { var particleSystemRegistry = ParticleSystemRegistry.Instance; ParticleSystemData psd = particleSystemRegistry.GetByParticleSystemId(this.ParticleSystemNodeId); if (psd != null) { psd.RemoveNodeId(this.ParticleSystemNodeId); if (psd.IsEmpty()) { particleSystemRegistry.Remove(psd); } } }
private void AddParticleSystem() { var particleSystemRegistry = ParticleSystemRegistry.Instance; ParticleSystemData psd = particleSystemRegistry.GetByParticleSystemId(this.ParticleSystemNodeId); string particleSystemName = FParticleSystemName[0]; if (psd != null) { psd.RemoveNodeId(this.ParticleSystemNodeId); if (psd.IsEmpty()) { particleSystemRegistry.Remove(psd); } } particleSystemRegistry.Add(particleSystemName, this.ParticleSystemNodeId, FBufferSemantics); }