Пример #1
0
 public void AmmoPicked(short amount, WeaponProp.WeaponType type)
 {
     if (type == WeaponProp.WeaponType.AK47)
     {
         if ((totallAmmoAK + amount) < maxAmmoAK)
         {
             totallAmmoAK += amount;
         }
         else
         {
             totallAmmoAK = maxAmmoAK;
         }
     }
     else
     {
         if ((totallAmmoM4 + amount) < maxAmmoM4)
         {
             totallAmmoM4 += amount;
         }
         else
         {
             totallAmmoM4 = maxAmmoAK;
         }
     }
 }
Пример #2
0
 public void SetTotalAmmo(WeaponProp.WeaponType temp, short amount)
 {
     if (temp == WeaponProp.WeaponType.AK47)
     {
         totallAmmoAK = amount;
     }
     if (temp == WeaponProp.WeaponType.M4A1)
     {
         totallAmmoM4 = amount;
     }
 }
Пример #3
0
 public WeaponProp ReturnWeaponInSlot(WeaponProp.WeaponType temp)
 {
     if (temp == WeaponProp.WeaponType.AK47)
     {
         return(secondSlot);
     }
     else
     {
         return(firstSlot);
     }
 }
Пример #4
0
 public void ChageTotalAmmo(WeaponProp.WeaponType temp, short amount)
 {
     if (temp == WeaponProp.WeaponType.AK47)
     {
         totallAmmoAK += amount;
     }
     else
     {
         totallAmmoM4 += amount;
     }
 }
Пример #5
0
 public short GetTottalAmmo(WeaponProp.WeaponType temp)
 {
     if (temp == WeaponProp.WeaponType.AK47)
     {
         return(totallAmmoAK);
     }
     else
     {
         return(totallAmmoM4);
     }
 }