Esempio n. 1
0
 //Particle Effects
 public void RegisterParticleEffect(ParticleEffectManager particleEffect)
 {
     if (!ParticleEffects.Contains(particleEffect))
     {
         ParticleEffects.Add(particleEffect);
     }
 }
Esempio n. 2
0
            public virtual void ReadChildData(BinaryReader reader)
            {
                int x = 0;

                _effect.ReadString(reader);
                _sound.ReadString(reader);
                for (x = 0; (x < _particleEffects.Count); x = (x + 1))
                {
                    ParticleEffects.Add(new ParticleSystemDefinitionBlockNewBlock());
                    ParticleEffects[x].Read(reader);
                }
                for (x = 0; (x < _particleEffects.Count); x = (x + 1))
                {
                    ParticleEffects[x].ReadChildData(reader);
                }
            }
Esempio n. 3
0
        internal static ParticleEffect TryGet(IntPtr handle)
        {
#if !(RELEASE && RELEASE_DISABLE_CHECKS)
            if (handle == IntPtr.Zero)
            {
                throw new NullPointerException();
            }
#endif
            var particleEffect = ParticleEffects.FirstOrDefault(x => x.Handle == handle);
            if (particleEffect == null)
            {
                particleEffect = new ParticleEffect(handle);
                ParticleEffects.Add(particleEffect);
            }

            return(particleEffect);
        }
        private void AddParticleEffect(ParticleEffect particleEffect, ICollidableTile trackingObject)
        {
            particleEffect.LoadContent(m_game.Content);

            particleEffect.Initialise();

            var entry = new LightCausingParticleObject(particleEffect, m_particleRenderer,
                                                       new PointLight()
            {
                Colour         = Color.Orange,
                LightIntensity = 4,
                LightRadius    = 25,
                LightPosition  = new Vector3(300, 160, -100)
            }, trackingObject)
            {
                Name    = "FlameThrower",
                Enabled = false
            };

            ParticleEffects.Add(entry);
        }