Пример #1
0
        protected override void ShootingPattern(GameTime gameTime)
        {
            EnemyStrongBlueLaser bullet = new EnemyStrongBlueLaser(Game, spriteSheet);

            bullet.Position  = Position;
            bullet.Direction = MathFunctions.ScaleDirection(ShootObject.Position - Position);
            bullet.Initialize();
            bullet.Speed *= 0.4f;

            Game.stateManager.shooterState.gameObjects.Add(bullet);
        }
Пример #2
0
        protected override void SecondaryShootingPattern(GameTime gameTime)
        {
            int numberOfShots = 8;

            for (int n = 0; n < numberOfShots; n++)
            {
                EnemyStrongBlueLaser bullet = new EnemyStrongBlueLaser(Game, spriteSheet);
                bullet.Position  = Position;
                bullet.Direction = MathFunctions.ScaleDirection(ShootObject.Position - Position);
                bullet.Direction = MathFunctions.SpreadDir(bullet.Direction, Math.PI / 16);
                bullet.Initialize();
                bullet.SetSpreadSpeed(random);
                bullet.Speed *= 0.35f;

                Game.stateManager.shooterState.gameObjects.Add(bullet);
            }
        }