Example #1
0
 public override void EnemyDestroy()
 {
     base.EnemyDestroy();
     BaseExplosion baseExplosion = new BaseExplosion(Position, enemyColor, 180);
     baseExplosion.Damage = 120;
     baseExplosion.DamagePercentage = 20;
     OGE.CurrentWorld.AddEntity(baseExplosion);
 }
Example #2
0
 public override void DestroyBulletMaxRange()
 {
     BaseExplosion baseExplosion = new BaseExplosion(Position, ExplosionColor, ExplosionRadius);
     baseExplosion.FriendlyExplosion = true;
     baseExplosion.Damage = damage;
     baseExplosion.DamagePercentage = ExplosionPower;
     OGE.CurrentWorld.AddEntity(baseExplosion);
     base.DestroyBulletMaxRange();
 }
        public override void ApplyBonus(PlayerEntity player)
        {
            base.ApplyBonus(player);

            BaseExplosion explosion = new BaseExplosion(Position, new Color(20, 80, 140), 300);
            explosion.FriendlyExplosion = true;
            explosion.Damage = 100;
            explosion.DamagePercentage = 0.1f;
            OGE.CurrentWorld.AddEntity(explosion);
        }
Example #4
0
        public override void DestroyBulletMaxRange()
        {
            BaseExplosion baseExplosion = new BaseExplosion(Position, ExplosionColor, ExplosionRadius);
            baseExplosion.FriendlyExplosion = true;
            baseExplosion.Damage = damage;
            baseExplosion.DamagePercentage = ExplosionPower;
            OGE.CurrentWorld.AddEntity(baseExplosion);

            GrenadeBullet bullet;
            Random random = OGE.Random;
            int startingAngle = OGE.Random.Next(360);
            int numberOfGrenades = 3;

            for (int i = 0; i < numberOfGrenades; i++)
            {
                float currentDirection = (startingAngle + i * 360.0f / numberOfGrenades) + OGE.Random.Next(10) - 5;

                bullet = new GrenadeBullet(Position, (float)(baseSpeed * (1 - 0.1 * random.NextDouble())),
                        currentDirection, (float)(grenadeDistance * (1 - 0.5 * random.NextDouble())));

                bullet.CurrentImages.Add(new Image(texture));
                bullet.CurrentImages[0].OriginX = bullet.CurrentImages[0].Width / 2;
                bullet.CurrentImages[0].OriginY = bullet.CurrentImages[0].Height / 2;
                bullet.CurrentImages[0].Angle = currentDirection;
                bullet.CurrentImages[0].Scale = 0.5f;
                bullet.AddCollisionMask(baseMask.Clone());

                OGE.CurrentWorld.AddEntity(bullet);
            }

            base.DestroyBulletMaxRange();
        }
Example #5
0
 private void Explode()
 {
     BaseExplosion baseExplosion = new BaseExplosion(Position, enemyColor, 200);
     baseExplosion.Damage = 200;
     baseExplosion.DamagePercentage = 20;
     baseExplosion.AdditiveWhite = 0.4f;
     BossHit(0, 0, 0, true);
     OGE.CurrentWorld.AddEntity(baseExplosion);
 }