public override void Shoot()
        {
            if (LastTimeShot > ShootingDelay)
            {
                BasicLaser laser1 = new BasicLaser(Game, spriteSheet);
                laser1.PositionX = PositionX - 4;
                laser1.PositionY = PositionY;
                laser1.Direction = new Vector2(0, -1.0f);
                laser1.Initialize();
                laser1.Tracker  = Tracker.Ally;
                laser1.Duration = 500;

                BasicLaser laser2 = new BasicLaser(Game, spriteSheet);
                laser2.PositionX = PositionX + 4;
                laser2.PositionY = PositionY;
                laser2.Direction = new Vector2(0, -1.0f);
                laser2.Initialize();
                laser2.Tracker  = Tracker.Ally;
                laser2.Duration = 500;

                Game.stateManager.shooterState.gameObjects.Add(laser1);
                Game.stateManager.shooterState.gameObjects.Add(laser2);

                LastTimeShot = 0;

                base.Shoot();
            }
        }
        private void Setup()
        {
            Name = "Field Damage";
            Kind = "Secondary";
            energyCostPerSecond = 0f;
            delay            = 800;
            Weight           = 400;
            ActivatedSoundID = SoundEffects.SmallLaser;
            displaySprite    = Game.spriteSheetItemDisplay.GetSubSprite(new Rectangle(200, 100, 100, 100));

            bullet = new BasicLaser(Game, spriteSheet);
            bullet.Initialize();

            damage   = Bullet.Damage;
            duration = Bullet.Duration;
            speed    = Bullet.Speed;

            Value         = 500;
            Tier          = TierType.Great;
            numberOfShots = 1;
        }
Esempio n. 3
0
        private void Setup()
        {
            Name = "Burster";
            Kind = "Primary";
            energyCostPerSecond = 12f;
            delay            = 400;
            Weight           = 500;
            ActivatedSoundID = SoundEffects.BigLaser;
            displaySprite    = Game.spriteSheetItemDisplay.GetSubSprite(new Rectangle(700, 0, 100, 100));

            bullet = new BasicLaser(Game, spriteSheet);
            bullet.Initialize();

            damage   = Bullet.Damage;
            duration = Bullet.Duration;
            speed    = Bullet.Speed;

            Value         = 900;
            Tier          = TierType.Great;
            numberOfShots = 12;
        }
Esempio n. 4
0
        private void Setup()
        {
            Name = "Dual Laser";
            Kind = "Primary";
            energyCostPerSecond = 5.5f;
            delay            = 300;
            Weight           = 200;
            ActivatedSoundID = SoundEffects.SmallLaser;
            displaySprite    = Game.spriteSheetItemDisplay.GetSubSprite(new Rectangle(100, 0, 100, 100));

            bullet = new BasicLaser(Game, spriteSheet);
            bullet.Initialize();

            damage   = Bullet.Damage;
            duration = Bullet.Duration;
            speed    = Bullet.Speed;

            Value         = 200;
            Tier          = TierType.Average;
            numberOfShots = 2;
        }
Esempio n. 5
0
        public override Boolean Activate(PlayerVerticalShooter player, GameTime gameTime)
        {
            Vector2 centerDir = new Vector2(0, -1.0f);
            double  spread    = Math.PI / 8;

            for (int n = 0; n < numberOfShots; n++)
            {
                BasicLaser bullet = new BasicLaser(Game, spriteSheet);
                bullet.PositionX = player.PositionX;
                bullet.PositionY = player.PositionY;

                bullet.Direction = MathFunctions.SpreadDir(centerDir, spread);
                bullet.Initialize();
                bullet.Duration *= 0.8f;
                bullet.Speed    *= 1f;
                bullet.Damage   *= 0.7f;

                bullet.SetSpreadSpeed(random);

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

            return(true);
        }