Esempio n. 1
0
        public Shotgun(IGunner owner, int damage, float range, int fireRate, float bulletSpeed,
            FireMode fireMode, float recoilPerShot, float maxRecoil, int clipSize, int reserveSize, int reloadTime, 
            int subShells, float shellSpread, bool clipReload, World world, string weaponName)
            : base(owner, damage, range, fireRate, bulletSpeed, fireMode, recoilPerShot, maxRecoil, clipSize, reserveSize, reloadTime, world, weaponName, GunType.Shotgun)
        {
            this.subShells = subShells;
            this.shellSpread = shellSpread;
            this.clipReload = clipReload;

            singleReloadTime = reloadTime;
        }
Esempio n. 2
0
 public ShotgunsFromFile(IGunner owner, World world, string weaponName)
     : base(owner, 0, 0, 0, 0, FireMode.Single, 0, 0, 0, 0, 0, 0, 0, true, world, weaponName)
 {
     #if WINDOWS
     IniFile data = new IniFile(@"main\specs\gunspecs.txt");
     this.damage = int.Parse(data.IniReadValue(weaponName, "damage"));
     this.range = float.Parse(data.IniReadValue(weaponName, "range"));
     this.fireRate = int.Parse(data.IniReadValue(weaponName, "fireRate"));
     this.bulletSpeed = float.Parse(data.IniReadValue(weaponName, "bulletSpeed"));
     this.fireMode = (FAZEngine.Weapons.FireMode)int.Parse(data.IniReadValue(weaponName, "fireMode"));
     this.recoilPerShot = float.Parse(data.IniReadValue(weaponName, "recoilPerShot"));
     this.maxRecoil = float.Parse(data.IniReadValue(weaponName, "maxRecoil"));
     this.clipSize = int.Parse(data.IniReadValue(weaponName, "clipSize"));
     this.reserveSize = int.Parse(data.IniReadValue(weaponName, "reserveSize"));
     this.reloadTime = int.Parse(data.IniReadValue(weaponName, "reloadTime"));
     this.subShells = int.Parse(data.IniReadValue(weaponName, "subShells"));
     this.shellSpread = float.Parse(data.IniReadValue(weaponName, "shellSpread"));
     this.clipReload = bool.Parse(data.IniReadValue(weaponName, "clipReload"));
     #else
     if (weaponName == "R870MCS")
     {
         this.damage = 83;
         this.range = 800;
         this.fireRate = 80;
         this.bulletSpeed = 50;
         this.fireMode = FAZEngine.Weapons.FireMode.Single;
         this.recoilPerShot = 0;
         this.maxRecoil = 10;
         this.clipSize = 8;
         this.reserveSize = 64;
         this.reloadTime = 400;
         this.subShells = 8;
         this.shellSpread = 0.26f;
         this.clipReload = false;
     }
     #endif
     clipAmmo = clipSize;
     reserveAmmo = reserveSize;
     singleReloadTime = reloadTime;
 }
Esempio n. 3
0
        /// <summary>
        /// Constructor
        /// </summary>
        public BasicGun(IGunner owner, int damage, float range, int fireRate, float bulletSpeed, FireMode fireMode, 
            float recoilPerShot, float maxRecoil, int clipSize, int reserveSize, int reloadTime, World world, string weaponName, GunType gunType)
        {
            this.owner = owner;
            this.damage = damage;
            this.range = range;
            this.fireRate = fireRate;
            this.bulletSpeed = bulletSpeed;
            this.fireMode = fireMode;
            this.recoilPerShot = recoilPerShot;
            this.maxRecoil = maxRecoil;
            this.clipSize = clipSize;
            this.reserveSize = reserveSize;
            this.reloadTime = reloadTime;
            this.world = world;
            this.weaponName = weaponName;
            this.gunType = gunType;
            clipAmmo = clipSize;
            reserveAmmo = reserveSize;

            currentRecoil = 0;
            random = new Random();
        }
Esempio n. 4
0
        public BasicGunsFromFile(IGunner owner, World world, string weaponName)
            : base(owner, 0, 0, 0, 0, FireMode.Single, 0, 0, 0, 0, 0, world, weaponName, GunType.Pistol)
        {
            #if WINDOWS
            IniFile data = new IniFile(@"main\specs\gunspecs.txt");
            this.damage = int.Parse(data.IniReadValue(weaponName, "damage"));
            this.range = float.Parse(data.IniReadValue(weaponName, "range"));
            this.fireRate = int.Parse(data.IniReadValue(weaponName, "fireRate"));
            this.bulletSpeed = float.Parse(data.IniReadValue(weaponName, "bulletSpeed"));
            this.fireMode = (FAZEngine.Weapons.FireMode)int.Parse(data.IniReadValue(weaponName, "fireMode"));
            this.recoilPerShot = float.Parse(data.IniReadValue(weaponName, "recoilPerShot"));
            this.maxRecoil = float.Parse(data.IniReadValue(weaponName, "maxRecoil"));
            this.clipSize = int.Parse(data.IniReadValue(weaponName, "clipSize"));
            this.reserveSize = int.Parse(data.IniReadValue(weaponName, "reserveSize"));
            this.reloadTime = int.Parse(data.IniReadValue(weaponName, "reloadTime"));
            this.gunType = (FAZEngine.Weapons.GunType)int.Parse(data.IniReadValue(weaponName, "gunType"));
            #else
            if (weaponName == "M1911")
            {
                this.damage = 40;
                this.range = 850;
                this.fireRate = 500;
                this.bulletSpeed = 50;
                this.fireMode = FAZEngine.Weapons.FireMode.Single;
                this.recoilPerShot = 0.038f;
                this.maxRecoil = 0.25f;
                this.clipSize = 8;
                this.reserveSize = 120;
                this.reloadTime = 1600;
                this.gunType = FAZEngine.Weapons.GunType.Pistol;
            }
            else if (weaponName == "AK74u")
            {
                this.damage = 45;
                this.range = 1100;
                this.fireRate = 750;
                this.bulletSpeed = 50;
                this.fireMode = FAZEngine.Weapons.FireMode.Auto;
                this.recoilPerShot = 0.040f;
                this.maxRecoil = 0.12f;
                this.clipSize = 30;
                this.reserveSize = 240;
                this.reloadTime = 2500;
                this.gunType = FAZEngine.Weapons.GunType.SMG;
            }
            else if (weaponName == "M4A1")
            {
                this.damage = 55;
                this.range = 1300;
                this.fireRate = 700;
                this.bulletSpeed = 50;
                this.fireMode = FAZEngine.Weapons.FireMode.Auto;
                this.recoilPerShot = 0.035f;
                this.maxRecoil = 0.16f;
                this.clipSize = 30;
                this.reserveSize = 240;
                this.reloadTime = 3000;
                this.gunType = FAZEngine.Weapons.GunType.AssultRifle;
            }
            else if (weaponName == "M60")
            {
                this.damage = 63;
                this.range = 1300;
                this.fireRate = 535;
                this.bulletSpeed = 50;
                this.fireMode = FAZEngine.Weapons.FireMode.Auto;
                this.recoilPerShot = 0.055f;
                this.maxRecoil = 0.16f;
                this.clipSize = 100;
                this.reserveSize = 300;
                this.reloadTime = 9100;
                this.gunType = FAZEngine.Weapons.GunType.LMG;
            }
            #endif

            clipAmmo = clipSize;
            reserveAmmo = reserveSize;
        }
Esempio n. 5
0
 public R870MCS(IGunner owner, World world)
     : base(owner, world, "R870MCS")
 {
     // because it's pump action
     this.recoilPerShot = 3600 * owner.GunRecoilControl / fireRate;
 }
Esempio n. 6
0
 public M4A1(IGunner owner, World world)
     : base(owner, world, "M4A1")
 {
 }
Esempio n. 7
0
 public AK74u(IGunner owner, World world)
     : base(owner, world, "AK74u")
 {
 }
Esempio n. 8
0
 public M1911(IGunner owner, World world)
     : base(owner, world, "M1911")
 {
 }
Esempio n. 9
0
 public M60(IGunner owner, World world)
     : base(owner, world, "M60")
 {
 }