private IList<AWeaponStat> __CreateAvailableBeamWeaponStats(int quantity) {
        IList<AWeaponStat> statsList = new List<AWeaponStat>(quantity);
        for (int i = 0; i < quantity; i++) {
            RangeCategory rangeCat = RangeCategory.Short;
            float maxLaunchInaccuracy = UnityEngine.Random.Range(UnityConstants.AngleEqualityPrecision, 3F);  // 0.04 - 3 degrees
            float reloadPeriod = UnityEngine.Random.Range(3F, 5F);
            float duration = UnityEngine.Random.Range(1F, 2F);
            string name = "Phaser Projector";
            float deliveryStrengthValue = UnityEngine.Random.Range(6F, 8F);
            var damageCategory = Enums<DamageCategory>.GetRandom(excludeDefault: true);
            float damageValue = UnityEngine.Random.Range(3F, 8F);
            DamageStrength damagePotential = new DamageStrength(damageCategory, damageValue);
            WDVCategory deliveryVehicleCategory = WDVCategory.Beam;
            WDVStrength deliveryVehicleStrength = new WDVStrength(deliveryVehicleCategory, deliveryStrengthValue);

            AWeaponStat weapStat = new BeamWeaponStat(name, AtlasID.MyGui, TempGameValues.AnImageFilename, "Description...", 0F, 0F, 0F, 0F, rangeCat,
                              deliveryVehicleStrength, reloadPeriod, damagePotential, duration, maxLaunchInaccuracy);
            statsList.Add(weapStat);
        }
        return statsList;
    }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BeamProjector"/> class.
 /// </summary>
 /// <param name="stat">The stat.</param>
 /// <param name="name">The optional unique name for this equipment. If not provided, the name embedded in the stat will be used.</param>
 public BeamProjector(BeamWeaponStat stat, string name = null)
     : base(stat, name) {
 }