protected override void Explode()
        {
            for (int i = 0; i < Config.Rand.Next(1, 5); i++)
            {
                Coin coin = new Coin(Config.CoinSpriteSheet);
                coin.Position = this.Position + new Vector2(Config.Rand.Next(0, 20) - 10, Config.Rand.Next(0, 20) - 10);
                //GameStateManagementGame.Instance.soundManager.PlaySound("ShipExplode", 0.3f);
            }

            base.Explode();
        }
示例#2
0
        protected override void Explode()
        {
            for (int i = 0; i < rand.Next(1, 5); i++)
            {
                Coin coin = new Coin(Config.CoinSpriteSheet);
                coin.Position = this.Position + new Vector2(rand.Next(0, 20) - 10, rand.Next(0, 20) - 10);
                //GameStateManagementGame.Instance.soundManager.PlaySound("ShipExplode");
            }

            for (int i = 0; i < 3; i++)
            {
                GameNode node = null;
                node = new BugDagger1(Config.BugDagger1SpriteSheet);
                node.Position = this.Position;
            }

            base.Explode();
        }
示例#3
0
        void SpawnItem(LevelItem_1 item)
        {
            GameNode node = null;

            if (item.Type == ItemType_1.EnemyInterceptor) node = new EnemyInterceptor(Config.EnemyInterceptorSpriteSheet);
            else if (item.Type == ItemType_1.EnemyAvoider) node = new EnemyAvoider(Config.EnemyAvoiderSpriteSheet);
            else if (item.Type == ItemType_1.EnemyChaser) node = new EnemyChaser(Config.EnemyChaserSpriteSheet);
            else if (item.Type == ItemType_1.EnemyDasher) node = new EnemyDasher(Config.EnemyDasherSpriteSheet);
            else if (item.Type == ItemType_1.EnemyShooter) node = new EnemyShooter(Config.EnemyShooterSpriteSheet);
            else if (item.Type == ItemType_1.PowerupHealth) node = new PowerupHealth(Config.PowerupSlowAllSpriteSheet);
            else if (item.Type == ItemType_1.PowerupMissiles) node = new PowerupMissiles(Config.PowerupMissileSpriteSheet);
            else if (item.Type == ItemType_1.PowerupWeaponAutoBurst) node = new PowerupWeaponAutoBurst(Config.PowerupSlowAllSpriteSheet);
            else if (item.Type == ItemType_1.boss1) node = new boss1(Config.BossSpriteSheet);
            else if (item.Type == ItemType_1.PowerupDamageAll) node = new PowerupDamageAll(Config.PowerupSlowAllSpriteSheet);
            else if (item.Type == ItemType_1.PowerupFreeze) node = new PowerupFreeze(Config.PowerupMissileSpriteSheet);
            else if (item.Type == ItemType_1.PowerupDoubleShot) node = new PowerupDoubleShot(Config.PowerupSlowAllSpriteSheet);
            else if (item.Type == ItemType_1.PowerupTripleShot) node = new PowerupTripleShot(Config.PowerupSlowAllSpriteSheet);
            else if (item.Type == ItemType_1.PowerupAddBullet) node = new PowerupAddBullet(Config.PowerupAddProjectileSpriteSheet);
            else if (item.Type == ItemType_1.PowerupShotSpeed) node = new PowerupShotSpeed(Config.PowerupProjectileSpeedSpriteSheet);
            else if (item.Type == ItemType_1.Coin) node = new Coin(Config.CoinSpriteSheet);

            if (node != null)
            {
                //TODO: suppy levelItem Y position from item
                //node.Position = new Vector2(item.PositionX, -node.Sprite.Origin.Y);
                node.Position = new Vector2(item.PositionX, item.PositionY);
                node.Speed = item.Speed;
                node.Direction = item.Direction;
            }

        }
        protected override void Explode()
        {
            for (int i = 0; i < Config.Rand.Next(1, 5); i++)
            {
                Coin coin = new Coin(Config.CoinSpriteSheet);
                coin.Position = this.Position + new Vector2(Config.Rand.Next(0, 20) - 10, Config.Rand.Next(0, 20) - 10);
                //GameStateManagementGame.Instance.soundManager.PlaySound("ShipExplode", 0.3f);
            }

            //EnemyChaser chaser = new EnemyChaser(Config.EnemySpriteSheet);
            //chaser.Speed = this.Speed;
            //chaser.Position = this.Position;

            //EnemyInterceptor interceptor = new EnemyInterceptor(Config.EnemySpikeSpriteSheet);
            //interceptor.Speed = this.Speed;
            //interceptor.Position = this.Position;

            //EnemyChaser chaser2 = new EnemyChaser(Config.EnemySpriteSheet);
            //chaser2.Position = this.Position;

            base.Explode();
        }
示例#5
0
        protected override void Explode()
        {
            //if (this.ExplosionSpriteSheet != null)
            //{
                //ParticleEffects.TriggerExplosionSquaresLarge(this.Position);
                //ParticleEffects.TriggerExplosionSquaresLarge(this.Position + new Vector2(10, 0));
                //ParticleEffects.TriggerExplosionSquaresLarge(this.Position + new Vector2(10, 10));
                //ParticleEffects.TriggerExplosionSquaresLarge(this.Position + new Vector2(0, 10));
                //ParticleEffects.TriggerExplosionSquaresLarge(this.Position + new Vector2(10, -10));
                //ParticleEffects.TriggerExplosionSquaresLarge(this.Position + new Vector2(-10, -10));
                //ParticleEffects.TriggerExplosionSquaresLarge(this.Position + new Vector2(-10, 0));
                //ParticleEffects.TriggerExplosionSquaresLarge(this.Position + new Vector2(-10, 10));
                //ParticleEffects.TriggerExplosionSquaresLarge(this.Position + new Vector2(0, -10));
                ParticleEffects.TriggerExplosionSquaresLarge(this.Position);
                ParticleEffects.TriggerExplosionSquaresLarge(this.Position + new Vector2(Config.Rand.Next(0, 100), 0));
                ParticleEffects.TriggerExplosionSquaresLarge(this.Position + new Vector2(Config.Rand.Next(0, 100), Config.Rand.Next(0, 100)));
                ParticleEffects.TriggerExplosionSquaresLarge(this.Position + new Vector2(0, Config.Rand.Next(0, 100)));
                ParticleEffects.TriggerExplosionSquaresLarge(this.Position + new Vector2(Config.Rand.Next(0, 100), Config.Rand.Next(100, 200) - 200));
                ParticleEffects.TriggerExplosionSquaresLarge(this.Position + new Vector2(Config.Rand.Next(100, 200) - 200, Config.Rand.Next(100, 200) - 200));
                ParticleEffects.TriggerExplosionSquaresLarge(this.Position + new Vector2(Config.Rand.Next(100, 200) - 200, 0));
                ParticleEffects.TriggerExplosionSquaresLarge(this.Position + new Vector2(Config.Rand.Next(100, 200) - 200, Config.Rand.Next(0, 100)));
                ParticleEffects.TriggerExplosionSquaresLarge(this.Position + new Vector2(0, Config.Rand.Next(100, 200) - 200));

            //}

            for (int i = 0; i < 100; i++)
            {
                Coin coin = new Coin(Config.CoinSpriteSheet);
                coin.Position = this.Position + new Vector2(rand.Next(0, 200) - 100, rand.Next(0, 200) - 100);
            }
            //GameStateManagementGame.Instance.soundManager.PlaySound("ShipExplode");
            base.Explode();
        }