Example #1
0
        private void Setup()
        {
            Name = "Proximity Laser";
            Kind = "Primary";
            energyCostPerSecond = 11f;

            delay            = 50;
            Weight           = 150;
            ActivatedSoundID = SoundEffects.SmallLaser;
            displaySprite    = Game.spriteSheetItemDisplay.GetSubSprite(new Rectangle(1000, 0, 100, 100));

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

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

            ShootsInBatchesSetup(2, 400);

            Value = 2000;
            Tier  = TierType.Excellent;

            numberOfShots = sideShots * 2 + 1;
        }
Example #2
0
        public override Boolean Activate(PlayerVerticalShooter player, GameTime gameTime)
        {
            float speedFactor    = 0.5f;
            float durationFactor = 1f;

            for (int dir = -sideShots; dir <= sideShots; dir++)
            {
                AdvancedLaser shot1 = new AdvancedLaser(Game, spriteSheet);
                shot1.PositionX = player.PositionX;
                shot1.PositionY = player.PositionY;
                BasicBulletSetup(shot1);
                shot1.Radians   = MathFunctions.RadiansFromDir(shot1.Direction) - dir * Math.PI / 30;
                shot1.Direction = MathFunctions.DirFromRadians(shot1.Radians);
                shot1.Speed    *= speedFactor;
                shot1.Duration *= durationFactor;

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

            return(true);
        }
        public override Boolean Activate(PlayerVerticalShooter player, GameTime gameTime)
        {
            AdvancedLaser laser1 = new AdvancedLaser(Game, spriteSheet);

            laser1.PositionX = player.PositionX - 4;
            laser1.PositionY = player.PositionY;

            BasicBulletSetup(laser1);

            AdvancedLaser laser2 = new AdvancedLaser(Game, spriteSheet);

            laser2.PositionX = player.PositionX + 4;
            laser2.PositionY = player.PositionY;

            BasicBulletSetup(laser2);

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

            return(true);
        }