コード例 #1
0
ファイル: PlayerEntity.cs プロジェクト: amidos2006/CleanEmUp
        private void IntializeParticleGenerators()
        {
            Particle particlePrototype = new Particle();
            particlePrototype.ParticleColor = new Color(40, 72, 127);
            particlePrototype.DeltaScale = -0.06f;
            particlePrototype.DeltaAlpha = -0.1f;

            this.trailParticleGenerator = new TrailParticleGenerator(OGE.CurrentWorld.TrailEffectSystem, particlePrototype);
            this.trailParticleGenerator.AngleDisplacement = 15;
            this.trailParticleGenerator.Speed = 2;
            this.trailParticleGenerator.Scale = 0.5f;

            Particle prototype = new Particle();
            prototype.DeltaScale = -0.03f;
            prototype.DeltaSpeed = -0.02f;
            prototype.DeltaAngle = 5f;

            this.fractionalGenerator = new FractionalParticleGenerator(OGE.CurrentWorld.ExplosionEffectSystem, prototype, 6);
            this.fractionalGenerator.Speed = 5;
            this.fractionalGenerator.NumberOfCircles = 3;
        }
コード例 #2
0
ファイル: SpikeBullet.cs プロジェクト: amidos2006/CleanEmUp
        public override void DestroyBulletCollision(BaseEntity entity)
        {
            Particle prototype = new Particle();
            prototype.DeltaScale = -0.03f;
            prototype.DeltaSpeed = -0.02f;
            prototype.DeltaAngle = 5f;

            FractionalParticleGenerator fractionalGenerator = new FractionalParticleGenerator(OGE.CurrentWorld.ExplosionEffectSystem,
                prototype, 4);
            fractionalGenerator.Speed = 5;
            fractionalGenerator.NumberOfCircles = 1;
            fractionalGenerator.AngleDisplacement = 30;
            fractionalGenerator.FractionTexture = CurrentImages[0].Texture;
            fractionalGenerator.GenerateParticles(Position);

            base.DestroyBulletCollision(entity);
        }