private void Setup()
        {
            Name = "Wave Beam";
            Kind = "Primary";
            energyCostPerSecond = 8f;
            delay            = 40;
            Weight           = 130;
            Value            = 550;
            Tier             = TierType.Good;
            ActivatedSoundID = SoundEffects.SmallLaser;
            displaySprite    = Game.spriteSheetItemDisplay.GetSubSprite(new Rectangle(500, 0, 100, 100));

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

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

            int shotsPerBatch      = 2;
            int timeBetweenBatches = 250;

            ShootsInBatchesSetup(shotsPerBatch, timeBetweenBatches);
            numberOfShots = 1;
        }
Пример #2
0
        public override Boolean Activate(PlayerVerticalShooter player, GameTime gameTime)
        {
            double width = Math.PI / 6;

            for (double dir = -width / 2 - Math.PI / 2; dir <= width / 2 - Math.PI / 2; dir += (width / numberOfShots))
            {
                GreenBullet bullet = new GreenBullet(Game, spriteSheet);
                bullet.Position  = player.Position;
                bullet.Direction = MathFunctions.DirFromRadians(dir);
                bullet.Initialize();
                bullet.Damage = damage;

                Game.stateManager.shooterState.gameObjects.Add(bullet);
            }
            return(true);
        }
        private void Setup()
        {
            Name = "Puny Turret";
            Kind = "Secondary";
            energyCostPerSecond = 0f;
            delay            = 100;
            Weight           = 130;
            ActivatedSoundID = SoundEffects.ClickLaser;

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

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

            Value = 75;
            Tier  = TierType.Average;
            ShootsInBatchesSetup(3, 1500);
            numberOfShots = 1;
        }
Пример #4
0
        private void Setup()
        {
            Name = "Multiple Shot";
            Kind = "Primary";
            energyCostPerSecond = 10f;
            delay            = 180;
            Weight           = 800;
            ActivatedSoundID = SoundEffects.SmallLaser;
            displaySprite    = Game.spriteSheetItemDisplay.GetSubSprite(new Rectangle(300, 0, 100, 100));

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

            damage   = Bullet.Damage * 0.7f;
            duration = Bullet.Duration;
            speed    = Bullet.Speed;

            Value         = 500;
            Tier          = TierType.Good;
            numberOfShots = 5;
        }
        public override Boolean Activate(PlayerVerticalShooter player, GameTime gameTime)
        {
            player.SightRange = CalculateRange();
            GameObjectVertical target = player.FindAimObject();

            if (target == null)
            {
                return(false);
            }

            Vector2 dir       = new Vector2(target.PositionX - player.PositionX, target.PositionY - player.PositionY);
            Vector2 scaledDir = MathFunctions.ScaleDirection(dir);

            GreenBullet bul = new GreenBullet(Game, spriteSheet);

            bul.PositionX = player.PositionX;
            bul.PositionY = player.PositionY;
            BasicBulletSetup(bul);
            bul.Direction = scaledDir;
            bul.Damage   *= 1.5f;

            Game.stateManager.shooterState.gameObjects.Add(bul);
            return(true);
        }