Beispiel #1
0
        /// <summary>
        /// Create and spawn the projectile(s) from a firing from this weapon.
        /// </summary>
        /// <param name="direction">The direction that the projectile will move.</param>
        protected override void CreateProjectiles(Vector2 direction)
        {
            // create the new projectile
            MineProjectile projectile = new MineProjectile(owner, direction);
            projectile.Initialize();
            owner.Projectiles.Add(projectile);

            // move the mine out from the ship
            projectile.Position = owner.Position +
                direction * (owner.Radius + projectile.Radius + mineSpawnDistance);
        }
Beispiel #2
0
        /// <summary>
        /// Create and spawn the projectile(s) from a firing from this weapon.
        /// </summary>
        /// <param name="direction">The direction that the projectile will move.</param>
        protected override void CreateProjectiles(Vector2 direction)
        {
            // create the new projectile
            MineProjectile projectile = new MineProjectile(owner, direction);

            projectile.Initialize();
            owner.Projectiles.Add(projectile);

            // move the mine out from the ship
            projectile.Position = owner.Position +
                                  direction * (owner.Radius + projectile.Radius + mineSpawnDistance);
        }