Ejemplo n.º 1
0
        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);
                }
            }
        }
Ejemplo n.º 2
0
        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);
        }