Example #1
0
        public override Boolean Activate(PlayerVerticalShooter player, GameTime gameTime)
        {
            HomingMissile missile1 = new HomingMissile(Game, spriteSheet);

            //Position
            missile1.PositionX = player.PositionX;
            missile1.PositionY = player.PositionY;
            //Direction
            missile1.Direction = new Vector2(0.0f, -1.0f);
            missile1.Initialize();
            missile1.Damage = damage;

            Game.stateManager.shooterState.gameObjects.Add(missile1);
            return(true);
        }
Example #2
0
        private void Setup()
        {
            Name = "HomingMissile";
            Kind = "Secondary";
            energyCostPerSecond = 0f;
            delay            = 1400;
            Weight           = 500;
            ActivatedSoundID = SoundEffects.ClickLaser;
            displaySprite    = Game.spriteSheetItemDisplay.GetSubSprite(new Rectangle(300, 100, 100, 100));

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

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

            Value         = 800;
            Tier          = TierType.Good;
            numberOfShots = 1;
        }