public AttachedWeapon(GameScreen gameScreen, Ship owner, float maxHealth, double fireRate)
     : base(gameScreen, maxHealth, 0d)
 {
     this._owner = owner;
     this._fireRate = fireRate;
     this._lastShot = 0;
 }
 public WeaponWithAmmo(GameScreen gameScreen, Ship owner, float maxHealth, double fireRate, 
                       double fireVelocity, int maxAmmo)
     : base(gameScreen, owner, maxHealth, fireRate)
 {
     _fireVelocity = fireVelocity;
     _maxAmmo = maxAmmo;
 }
        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;
        }
예제 #4
0
 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");
 }
예제 #5
0
 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)
 {
 }
예제 #7
0
 public TestGun(GameScreen gameScreen, Ship owner)
     : base(gameScreen, owner, 1f, 0.5d, 0.1d, 5)
 {
 }
예제 #8
0
 public Player(Texture2D txPlayerShip, Texture2D txBullet, WeaponTypes weaponTypes)
 {
     this.playerShip = new Ship(PlayerIndex.One, txPlayerShip, txBullet, weaponTypes);
 }
예제 #9
0
 public TestGun(GameplayScreen gameplayScreen, Ship owner)
     : base(gameplayScreen, owner)
 {
 }
 public AttachedWeapon(GameplayScreen gameplayScreen, Ship owner)
     : base(gameplayScreen, 1f, 0d)
 {
     this._owner = owner;
 }