コード例 #1
0
ファイル: Scene.cs プロジェクト: cribin/GameLab2017
 //Particle Effects
 public void RegisterParticleEffect(ParticleEffectManager particleEffect)
 {
     if (!ParticleEffects.Contains(particleEffect))
     {
         ParticleEffects.Add(particleEffect);
     }
 }
コード例 #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);
                }
            }
コード例 #3
0
ファイル: ParticleEffect.cs プロジェクト: ternite/CryMono
        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);
        }
コード例 #4
0
        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);
        }