public WeaponWithAmmo(GameScreen gameScreen, Ship owner, float maxHealth, double fireRate, 
                       double fireVelocity, int maxAmmo)
     : base(gameScreen, owner, maxHealth, fireRate)
 {
     _fireVelocity = fireVelocity;
     _maxAmmo = maxAmmo;
 }
 public AttachedWeapon(GameScreen gameScreen, Ship owner, float maxHealth, double fireRate)
     : base(gameScreen, maxHealth, 0d)
 {
     this._owner = owner;
     this._fireRate = fireRate;
     this._lastShot = 0;
 }
 public Ammo(GameScreen gameScreen, AttachedWeapon owner, float maxHealth, 
                 double spawnTime, double lifeTime)
     : base(gameScreen, maxHealth, 0d)
 {
     _owner = owner;
         _spawnTime = spawnTime;
         _lifeTime = lifeTime;
 }
 public Ammo(GameScreen gameScreen, WeaponWithAmmo owner, float maxHealth, 
                 GameTime gameTime, double lifeTime)
     : base(gameScreen, maxHealth, 0d)
 {
     _owner = owner;
         _spawnTime = gameTime.TotalRealTime.TotalSeconds;
         _lifeTime = lifeTime;
 }
        public static FloatingWeapon generateFloatingWeapon(Weapons weapon, GameScreen gameScreen)
        {
            AttachedWeapon tempWeapon = generateAttachedWeapon(weapon, gameScreen, null);

            return new FloatingWeapon(gameScreen, weapon)
                       {
                           ObjectModel = tempWeapon.ObjectModel,
                           BSphere = tempWeapon.ObjectModel.Meshes[0].BoundingSphere
                       };
        }
        public void LoadContent(GameScreen screen)
        {
            //Now that we are physically loading the level we need to know what screen we are attaching to
            //The screen gives us access to a screenmanager which gives us access to the ability to load content.
            //This may not be the best method =P.
            GameScreen = screen;

            //Hopefully your CurrentDirectory isn't out of whack somehow.
            loadLevelFromFile(Environment.CurrentDirectory + @"\Content\Levels\MoritoLevel.xml");
            return;
        }
        public static AttachedWeapon generateAttachedWeapon(Weapons weapon, GameScreen gameScreen, Ship owner)
        {
            AttachedWeapon aWeapon;
            switch (weapon)
            {
                case Weapons.TestGun:
                    aWeapon = new TestGun(gameScreen, owner);
                    break;

                case Weapons.Fan:
                    aWeapon = new Fan(gameScreen, owner);
                    break;

                case Weapons.RemoteMineLauncher:
                    aWeapon = new RemoteMineLauncher(gameScreen, owner);
                    break;

                default:
                    aWeapon = null;
                    break;
            }

            return aWeapon;
        }
 public TestGun(GameScreen gameScreen, Ship owner)
     : base(gameScreen, owner, 1f, 0.5d, 0.1d, 5)
 {
     this.ObjectModel = gameScreen.ScreenManager.Game.Content.Load<Model>(@"Models\simpleWeapon");
 }
 public Fan(GameScreen gameScreen, Ship owner)
     : base(gameScreen, owner, 1f, 0.1d)
 {
 }
 public RemoteMineLauncher(GameScreen gameScreen, Ship owner)
     : base(gameScreen, owner, 1f, 2f, 0.1f, 1)
 {
 }
 public TestGun(GameScreen gameScreen, Ship owner)
     : base(gameScreen, owner, 1f, 0.5d, 0.1d, 5)
 {
 }
 public FloatingWeapon(GameScreen gameScreen, Weapons weapon)
     : base(gameScreen)
 {
     _weapon = weapon;
 }
 public RemoteMine(GameScreen gameScreen, WeaponWithAmmo owner, GameTime gametime, double lifeTime)
     : base(gameScreen, owner, 1f, gametime, lifeTime)
 {
 }