示例#1
0
 public ShellInfo(Shell shell, ListVehicleProfile.ListGun gun)
 {
     Penetration        = shell.penetration;
     ShellDamage        = shell.damage;
     Alpha              = ShellDamage * gun.clip_capacity;
     Count              = 0;
     Frequency          = 1;
     DamagePerMinute    = ShellDamage * gun.fire_rate;
     AdvDamagePerMinute = (DamagePerMinute + Alpha) * (60.0 / (60 + (gun.clip_reload_time * (gun.clip_capacity - 1))));
 }
示例#2
0
            public GunInfo(ListVehicleProfile.ListGun gun, int id)
            {
                Dispersion       = gun.dispersion;
                AimTime          = gun.aim_time;
                ClipCapacity     = gun.clip_capacity;
                GunElevation     = gun.move_up_arc;
                GunDepression    = gun.move_down_arc;
                ReloadTime       = gun.reload_time;
                GunTraverseSpeed = gun.traverse_speed;
                ClipReloadTime   = gun.clip_reload_time;
                FireRate         = gun.fire_rate;
                Caliber          = gun.caliber;

                var module = API.GUNS[id];

                DefaultShell = module.shells.First();
                Shells       = module.shells.ToDictionary(s => s.type, s => new ShellInfo(s, gun));
                Name         = module.name;
                Tier         = module.tier;
                ID           = id;
                Weight       = module.weight;
            }