Beispiel #1
0
 public static bool TryCreate <TAmmo>(float weight, GunType typeOfGun, Ammo.TypeOfBoost boostType, TAmmo ammoType, out MachineGun machineGun) where TAmmo : IAmmo
 {
     if (AvailableAmmoTypes().Contains(typeof(TAmmo)))
     {
         machineGun = new MachineGun(weight, typeOfGun, boostType, ammoType);
         return(true);
     }
     machineGun = null;
     return(false);
 }
Beispiel #2
0
 public static bool TryCreate <TAmmo>(float weight, GunType typeOfGun, Ammo.TypeOfBoost boostType, TAmmo ammoType, out PlasmaCannon plasmaCannon) where TAmmo : IAmmo
 {
     if (AvailableAmmoTypes().Contains(typeof(TAmmo)))
     {
         plasmaCannon = new PlasmaCannon(weight, typeOfGun, boostType, ammoType);
         return(true);
     }
     plasmaCannon = null;
     return(false);
 }
Beispiel #3
0
 private MachineGun(float weight, GunType typeOfGun, Ammo.TypeOfBoost boostType, IAmmo ammoType)
     : base(weight, typeOfGun, boostType, ammoType)
 {
 }
Beispiel #4
0
 private PlasmaCannon(float weight, GunType typeOfGun, Ammo.TypeOfBoost boostType, IAmmo ammoType)
     : base(weight, typeOfGun, boostType, ammoType)
 {
 }