private void Setup()
        {
            Name = "Fragment Missile";
            Kind = "Primary";
            energyCostPerSecond = 12f;
            delay            = 450;
            Weight           = 500;
            ActivatedSoundID = SoundEffects.ClickLaser;
            displaySprite    = Game.spriteSheetItemDisplay.GetSubSprite(new Rectangle(800, 0, 100, 100));

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

            MissileFragment fragment = new MissileFragment(Game, spriteSheet);

            fragment.Initialize();

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

            Value         = 1000;
            Tier          = TierType.Great;
            numberOfShots = 23;
        }
Exemplo n.º 2
0
        // Used to create a missile according to given parameters, and add it to the game
        private void CreateMissile(PlayerVerticalShooter player, float xDiff, Vector2 direction, float speedFactor = 1)
        {
            RegularMissile missile = new RegularMissile(Game, spriteSheet);

            missile.PositionX = player.PositionX + xDiff;
            missile.PositionY = player.PositionY;
            missile.Direction = direction;
            missile.Radians   = MathFunctions.RadiansFromDir(missile.Direction);
            missile.Initialize();
            missile.Speed *= speedFactor;

            Game.stateManager.shooterState.gameObjects.Add(missile);
        }
Exemplo n.º 3
0
        private void Setup()
        {
            Name = "SideMissiles";
            Kind = "Secondary";
            energyCostPerSecond = 0f;
            delay            = 1400;
            Weight           = 500;
            ActivatedSoundID = SoundEffects.ClickLaser;
            displaySprite    = Game.spriteSheetItemDisplay.GetSubSprite(new Rectangle(400, 100, 100, 100));

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

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

            Value         = 600;
            Tier          = TierType.Great;
            numberOfShots = 4;
        }